SpikeSimulation: Spike train simulation

View source: R/SpikeSimulation.R

SpikeSimulationR Documentation

Spike train simulation

Description

Simulates spike trains from an inhomogeneous Poisson process with a given time-varying intensity function of one of the forms discussed in Ramezan et al. (2014).

Usage

SpikeSimulation(
  nruns,
  t.start = 0,
  t.end,
  resolution = 0.001,
  intensity.function,
  pass.arg,
  envelope.function = function(t) return(1)
)

Arguments

nruns

a scalar determining the number of spike trains (trials) to be simulated.

t.start

the starting time of the simulated data collection.

t.end

the ending time of the simulated data collection.

resolution

the time resolution of the spike train. The default is 0.001 (1 ms).

intensity.function

any intensity function for the corresponding process from which you want to simulate data.

pass.arg

a list of arguments to pass to the intensity function. In the additive and multiplicative models, this contains four numeric vectors; the first vector determines the frequencies, the second vector determines initial phases, the third vector determines the \eta values and the fourth vector determines the \gamma values.

envelope.function

The envelope function used for acceptance-rejection sampling to simulate the data.

Value

A list of numeric vectors, each of which contains a simulated spike train.

References

Ramezan, R., Marriott, P., and Chenouri, S. (2014), Statistics in Medicine, 33(2), 238-256. doi: 10.1002/sim.5923.


dpwynne/mmnst documentation built on Aug. 1, 2023, 8:08 a.m.