generate_ouss {peacots} | R Documentation |
Generate random time series of the OUSS process
Description
Generate a random time series of the 1-dimensional stationary Ornstein-Uhlenbeck state space (OUSS) process.
Usage
generate_ouss(times, mu, power_o, sigma,
lambda, power_e, epsilon)
Arguments
times |
Numeric vector of times for which to evaluate OUSS model. Times need to be strictly increasing. |
mu |
Single number. Deterministic equilibrium of OU process, i.e., the expected value of the time series at any particular time. |
sigma |
Single number. Standard deviation of OU fluctuations around equilibrium. |
power_o |
Single non-negative number. Power spectrum at zero-frequency generated by the OU process. Either |
lambda |
Single non-negative number. Resilience (also known as relaxation rate) of the OU process. This is the inverse of the OU correlation time. |
epsilon |
Single number. Standard deviation of Gaussian measurement error. Setting this to zero will yield a time series from the classical OU process. |
power_e |
Single non-negative number. Asymptotic power spectrum at large frequencies due to the Gaussian measurement errors. Setting this to zero will yield a classical OU process. Either |
Details
The OUSS model describes the measurement of an Ornstein-Uhlenbeck (OU) stochastic process at discrete times with additional uncorrelated Gaussian measurement errors. The OU process itself is a continuous-time random walk (Brownian motion) with linear stabilizing forces, described by the stochastic differential equation
dX = \lambda(\mu-X) dt + s dW,
where W
is the standard Wiener process and s^2=2\lambda\sigma^2.
The OUSS model is obtained by adding uncorrelated Gaussian numbers with zero mean and variance \epsilon^2
to the time series.
Value
A numeric vector of same length as times
, containing sampled values of the OUSS process. These values will all have the same expectation (mu
) and variance (sigma^2+epsilon^2
) but will be correlated.
Author(s)
Stilianos Louca
References
Louca, S., Doebeli, M. (2015) Detecting cyclicity in ecological time series, Ecology 96: 1724–1732
Dennis, B., Ponciano, J.M. - Density dependent state-space model for population abundance data with unequal time intervals, Ecology (in press as of June 2014)
See Also
Examples
# define times
times = seq(0,100,0.5);
# generate OUSS time series
signal = generate_ouss(times=times, mu=0, sigma=1, lambda=1, epsilon=0.5);
# plot time series
plot(ts(times), ts(signal),
xy.label=FALSE, type="l",
ylab="signal", xlab="time", main="OUSS time series");