EM: EM

Description Usage Arguments Details Value Author(s) Examples

View source: R/EM.R

Description

EM algorithm to get MLEs for latent CTMC parameters

Usage

1
2
3
4
  EM(rates.setup, init.setup, emission.setup, the.data,
    num.subjects, num.states, num.obs.states, tol = 1e-07,
    absorb.state, maxiter = 500, DDO.setup = NULL,
    do.DDO = F, time.dep.emission = F)

Arguments

rates.setup

list with rate setup information

init.setup

list with initial distribution setup information

emission.setup

list with emission distribution setup information

the.data

list with the observed data, with one entry per individual

num.subjects

number of individuals in the study

num.states

number of latent states in the CTMC

num.obs.states

number of observed states

tol

convergence tolerance for the EM

absorb.state

vector of one or more absorbing latent states

maxiter=500

maximum number of iterations of the EM

DDO.setup

setup object for disease driven observation model

do.DDO

Indicator (T/F) if there are disease driven observation times in the model?

time.dep.emission

(Not supported) Indicator if emission distribution has time dependent covariates.

Details

Run the expectation-maximization algorithm to get the maximum likelihood estimates for latent CTMC model parameters for multistate disease models. Data are discretely observed disease processes from multiple independent individuals. Times may be non-informative scheduled times or disease-dependent (informative) times. Uses the SQUAREM package for EM acceleration.

Value

params

MLEs for model parameters: rates/emission/initial/DDO, parameters listed in order of model specification

details

Details of the EM optimization from the SQUAREM package output

.

updates

The iterative oupdates for the parmaeter esitmates at each EM step

LL.updates

Updates of observed data likelihood at each step

time

Run time

num.evals

Number of iterations of the EM

LL

Final complete data log likelihood

Author(s)

Jane Lange

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
library(cthmm)
#load the model setup and example data for a competing risks model
#observed at scheduled and informative observation times.
data(DDO_data)
#run the EM on the example data
DDO_EM=EM(rates.setup=rates.setup,
init.setup=init.setup,
emission.setup=emission.setup,
the.data=DDO_data,
num.subjects=500,
num.states=4,
num.obs.states=3,
tol = 1e-07,
absorb.state=c(3,4),
maxiter = 500,
DDO.setup = DDO.setup,
do.DDO = T)
## End(Not run)

cthmm documentation built on May 2, 2019, 5:46 p.m.