Description Usage Arguments Details Value Note See Also Examples
Generate artificial oscillating time series of various types.
1 | multi_sims(type, noises, n, freq = 0.2, end = 50, ...)
|
type |
character indicating which type of time series are to be generated. Possible values are: "ps": Phase-Shifted plain sinusoids; "pst": Phase-Shifted plain sinusoids with linear trend over time; "psd": Phase-Shifted and Damped sinusoids (chirp); "na": Noisy Amplitude, plain sinusoids with Gaussian white noise; "nad": Noisy Amplitude Damped, plain sinusoids with Gaussian white noise; "edls": Exponential Decay Lag Shifted. |
noises |
numerical vector giving levels of noise to generate the data. Do not pass 0 (no noise) as this is already generated by default. The feature controlled by this argument varies across types of simulations. Phase-Shifted simulations ('psX'): standard deviation of the Gaussian distribution used to shift the curves. Noisy-Amplitude simulations ('naX'): standard deviation of the Gaussian distribution used to generate amplitude noise at each time point. Exponential decay Lag Shifted: standard deviation of the Gaussian distribution used to generate the lag between excitation time and response time. Typical values ranges from 0 to 2. |
n |
number of trajectories per noise level. |
freq |
numeric, spacing between 2 time points. |
end |
numeric, end time of simulations. |
... |
Additional arguments specific to simulation type. See corresponding sim_X functions. |
See ?sim_phase_shifted.
a data.table containing the trajectories in long format in 4 columns. "variable" indicates the ID of the trajectory. IDs are named V1, V2, ..., Vn for each level of noise.
TODO - function is not optimized: it builds the simulation by growing a data.table. plot_sim can be used to visualize the output.
plot_sim, sim_phase_shifted, sim_phase_shifted_damped, sim_phase_shifted_with_fixed_trend, sim_noisy_amplitude, sim_noisy_amplitude_damped, sim_expodecay_lagged_stim
1 2 | x <- multi_sims(type = "ps", noises = seq(0.5, 2, 0.5), n = 10, freq = 0.5, end = 30)
plot_sim(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.