Simulate spike trains from DAPP model to binned spiking data
dapp.simulate(horizon = 1000, bin.width = 25, lengthScale,
lsPrior = rep(1/length(lengthScale),length(lengthScale)),
hyper = list(prec = c(1,1), sig0 = 1.87, w=c(1,1)), nsamp = 1e3)time horizon of the response period (in ms)
width of the time bins (in ms) to be used to aggregate spike counts
an array giving the length scale parameter values to be used for Gaussian process prior. Defaults to sort(0.16 * resp.horiz / c(4, 3, 2, 1, 0.5, 0.1)) where resp.horiz is the time horizon of the response period.
an array of the same length as lengthScale giving the prior probabilities of the length scale values.
a list of hyper parameters with the following iterms. 'prec': a 2-vector giving the shape and rate parameters of the gamma distribution on the Dirichlet precision parameter. 'sig0': a scalaer giving the scale of the (centered) logistic distribution used in transforming the Gaussian random curves into curves restricted between 0 and 1.
number of priors draws to be made
Returns a list of class "dapp" containting the following items.
draws of length scale
prior predictive draws of alpha
draws of precision
Primarily intended to be used internally by the summary.dapp and plot.dapp functions. Could also be use to draw directly from the model.
# NOT RUN {
prior <- dapp.simulate(1000, 25)
# }
Run the code above in your browser using DataLab