sim.mmre.offdiag: Function to simulate a two state Markov transition log-linear...

sim.mmre.offdiagR Documentation

Function to simulate a two state Markov transition log-linear model Number simulated will correspond to length of given times and covariate.

Description

Function to simulate a two state Markov transition log-linear model Number simulated will correspond to length of given times and covariate.

Usage

sim.mmre.offdiag(par.sim, cov, times, ID, start.state, random, fit)

Arguments

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.

fit

a mmre fit object, either supplied or all other armugents


cmjt/mmre documentation built on Oct. 2, 2023, 11:24 p.m.