update.rate.params: Performs Newton Raphson to get MLE for rate parameters.

Description Usage Arguments Value Author(s)

View source: R/update.rate.params.r

Description

Important: currently only runs NR max.it times (not until convergence). Thus this function can be used to obtain the rate matrices based on the provided values of current.params, if transitions=NULL, durations=NULL, and max.it=1.

Usage

1
2
  update.rate.params(current.params, rate.setup,
    transitions = NULL, durations = NULL, max.it)

Arguments

rate.setup

object: must have covariate array, param.types

transitions

matrix of dim(num.states,num.states,num.subjects) with all i,j transtions for all subjects

durations

matrix of dim(num,states, num.subjects) with the duration spent in each state

current.params

initial values of the parameters

max.it

maximum number of Newton Raphson iterations. If max.it=1, no updates are performed.

Value

list with

params

an array of dim number of parameters, max.it

rates

array with each column representing the vector of calculated rates for a single subject, based on the last value of the parameters

transition.codes

matrix columns "ni" and "nj" i,j entries in the rate matrix

Author(s)

Jane Lange


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