RDPCrossValidation | R Documentation |
Optimizes a penalized log-likelihood to find the optimal number of partitions for the recursive dyadic partitioning.
RDPCrossValidation(
spikes,
t.start = 0,
t.end,
poss.lambda = seq(0, 10, by = 0.1),
max.J = 7,
PSTH = FALSE,
max.diff = 0.005,
pct.diff.plot = TRUE,
print.J.value = TRUE
)
spikes |
a list of spike trains. |
t.start |
the starting time of the recording window; the default value is 0. |
t.end |
the ending time of the recording window. |
poss.lambda |
a numeric vector containing a grid of penalty values. |
max.J |
the maximum resolution of the dyadic partitioning used the estimate the piecewise constant intensity function |
PSTH |
if TRUE, performs leave-one-train-out cross-validation for the c(t) estimate based on PSTH data. If FALSE, performs leave-one-spike-out cross-validation for the c(t) estimate from each individual train. |
max.diff |
the maximum allowance for the integrated squared error (ISE) of a smaller model to deviate from the overall minimum ISE. |
pct.diff.plot |
a logical value indicating whether to produce a plot of the percentage difference (above minimum ISE) vs. J. |
print.J.value |
a logical value indicating whether to print off the J value at each step of the cross-validation or not. |
A list of length 3 is returned returned.
The first item in the list is the optimal partition depth as computed by ISE (\lambda
).
The second item in the list is the optimal penalty term as corresponding to that partition depth (J).
The third item in the list is a matrix containing the ISE values for all combinations of partition depth and penalty term.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.