Description Usage Arguments Details Value See Also Examples
generate.panel.2order
Generation of second order differential equation solutions for several individuals with intra-individual and inter-individual noise.
The function generates the equation coefficients following a normal distribution based on the parameter internoise and the coefficients provided as input.
It then calls the function generate.2order
to generate a solution of a second order differential equation with these parameters for the nind individuals.
Finally it adds measurement noise to each signal according to the value of the parameter intranoise.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | generate.panel.2order(
time,
excitation = NULL,
y0 = 1,
v0 = 0,
t0 = NULL,
xi = 0.1,
period = 10,
k = 1,
yeq = 0,
nind = 1,
internoise = 0,
intranoise = 0
)
|
time |
is a vector containing the time values corresponding to the excitation signal. |
excitation |
Is a vector containing the values of the excitation signal. |
y0 |
is the initial condition for the variable y(t=t0), (0, by default), it is a scalar. |
v0 |
is the initial condition for the derivative dy(t=t0), (0, by default), it is a scalar. |
t0 |
is the time corresponding to the initial condition y0 and v0. Default is the minimum value of the time vector. |
xi |
is the damping factor. A negative value will produce divergence from equilibrium. |
period |
is the period T of the oscillation, T = \frac{2*π}{ω_{n}} as mentioned |
k |
Default is 1. It represents the proportionality between the stationary increase of signal and the excitation increase that caused it. Only relevant if the excitation is non null. |
yeq |
is the signal equilibrium value, i.e. the stationary value reached when the excitation term is 0. |
nind |
number of individuals. |
internoise |
Is the inter-individual noise added. The damping factor across individuals follows a normal distribution centered on the input parameter xi with a standard deviation of internoise*xi. The same applies to the other coefficients of the differential equation (T,k and yeq) and to the initial conditions (y0 and v0) |
intranoise |
Is the noise to signal ratio: dynamic noise added to each signal defined as the ratio between the variance of the noise and the variance of the signal |
Used for simulations in the context of the package.
Returns a data frame with signal and time values for the time and excitation vectors provided. It contains the following columns:
id - individual identifier (from 1 to nind).
excitation - excitation signal provided as input
time - time values provided as input
signalraw - signal with no noise (inter noise added for each individual)
signal - signal with intra noise added
generate.2order
for calculation of the numerical solution to the second order differential equation
and generate.excitation
for excitation signal generation
1 2 3 4 5 6 7 8 | generate.panel.2order(time = generate.excitation(3, 6, 2, 1, 200, 2)$t,
excitation = generate.excitation(3, 6, 2, 1, 200, 2)$exc,
xi = 0.1,
period = 0.5,
k = 1,
nind = 5,
internoise = 0.2,
intranoise = 0.1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.