sim.mmre.trunc | R Documentation |
Function to simulate a two state Markov transition truncated log-linear model Number simulated will correspond to length of given times and covariate.
sim.mmre.trunc(par.sim, cov, times, ID, start.state, random, trunc, fit)
par.sim |
a named list of parameters. Must contain "log_baseline","jump", and "decay" all vectors of length two corresponding to parameters of the off diagonal transition rates. If data being simulated from a random model then must contain element "sig" the standard deviation of the bivariate normal individual level random effect. |
cov |
a vector of covariate values (i.e., days since exposure) |
times |
numeric vector of observed times |
ID |
a character vector of whale Ids for zero meaned mvn independent random effects |
start.state |
numeric initial state (can only be 1 or 2) |
random |
logical, should individual random effects be included. |
trunc |
numeric truncation at which covariate has no effect |
fit |
a mmre fit object, either supplied or all other armugents |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.