update.init.params: Performs Newton Raphson to get MLE for initial dist...

Description Usage Arguments Value Author(s)

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

Description

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

Usage

1
2
  update.init.params(current.params, init.setup,
    init.counts = NULL, max.it = 1)

Arguments

init.setup

initial distributions setup object: must have covariate array, param.types

init.counts

matrix (dim(num.hidden.states,num.subjects)) with the initial dist count data

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

prob.matrix

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

states

hidden states corresponding to rows of prob.matrix: will not include ref states or states with zero prob!

init.counts

array with (dim=num.states,num.subjects) of the initial distribution for each individual.

Author(s)

Jane Lange


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