dapp.simulate: Simulate from Dynamic Admixture of Poisson Process

Description Usage Arguments Details Value Examples

View source: R/dynamic_neural_model-v6.R

Description

Simulate spike trains from DAPP model to binned spiking data

Usage

1
2
3
4
 
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)

Arguments

horizon

time horizon of the response period (in ms)

bin.width

width of the time bins (in ms) to be used to aggregate spike counts

lengthScale

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.

lsPrior

an array of the same length as lengthScale giving the prior probabilities of the length scale values.

hyper

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.

nsamp

number of priors draws to be made

Details

Primarily intended to be used internally by the summary.dapp and plot.dapp functions. Could also be use to draw directly from the model.

Value

Returns a list of class "dapp" containting the following items.

lsProb

draws of length scale

alpha.pred

prior predictive draws of alpha

prec

draws of precision

Examples

1
prior <- dapp.simulate(1000, 25)

neuromplex documentation built on April 22, 2021, 5:11 p.m.