simulateAR1 {LZeroSpikeInference} | R Documentation |
Simulate fluorescence trace based on simple AR(1) generative model
Description
Simulate fluorescence trace based on simple AR(1) generative model
Usage
simulateAR1(n, gam, poisMean, sd, seed)
Arguments
n |
number of timesteps |
gam |
AR(1) decay rate |
poisMean |
mean for Poisson distributed spikes |
sd |
standard deviation |
seed |
random seed |
Details
Simulate fluorescence trace based on simple AR(1) generative model
y_t = c_t + eps, eps ~ N(0, sd)
c_t = gam * c_t-1 + s_t
s_t ~ Pois(poisMean)
Value
spikes, fluorescence, and calcium concentration
See Also
Estimate spikes:
estimateSpikes
,
print.estimatedSpikes
,
plot.estimatedSpikes
.
Cross validation:
cv.estimateSpikes
,
print.cvSpike
,
plot.cvSpike
.
Simulation:
simulateAR1
,
plot.simdata
.
Examples
sim <- simulateAR1(n = 500, gam = 0.998, poisMean = 0.009, sd = 0.05, seed = 1)
plot(sim)
[Package LZeroSpikeInference version 1.0.3 Index]