sim.mmre.decay: Function to simulate Matrkov transition model where...

sim.mmre.decayR Documentation

Function to simulate Matrkov transition model where transition intensities are given by beta0 + beta1*exp(-beta2*cov) + individual.random.effect Number simulated will correspond to length of given times and covariates.

Description

Function to simulate Matrkov transition model where transition intensities are given by beta0 + beta1*exp(-beta2*cov) + individual.random.effect Number simulated will correspond to length of given times and covariates.

Usage

sim.mmre.decay(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.