Learn R Programming

LMest (version 3.1.2)

est_lm_cov_latent: Estimate LM model with covariates in the latent model

Description

Main function for estimating the LM model with covariates in the latent model.

The function is no longer maintained. Please look at lmest function.

Usage

est_lm_cov_latent(S, X1=NULL, X2=NULL, yv = rep(1,nrow(S)), k, start = 0, tol = 10^-8,
                  maxit = 1000, param = "multilogit", Psi, Be, Ga, fort = TRUE,
                  output = FALSE, out_se = FALSE, fixPsi = FALSE)

Value

lk

maximum log-likelihood

Be

estimated array of the parameters affecting the logit for the initial probabilities

Ga

estimated array of the parameters affecting the logit for the transition probabilities

Piv

estimate of initial probability matrix

PI

estimate of transition probability matrices

Psi

estimate of conditional response probabilities

np

number of free parameters

aic

value of AIC for model selection

bic

value of BIC for model selection

lkv

log-likelihood trace at every step

V

array containing the posterior distribution of the latent states for each response configuration and time occasion

Ul

matrix containing the predicted sequence of latent states by the local decoding method

sePsi

standard errors for the conditional response matrix

seBe

standard errors for Be

seGa

standard errors for Ga

call

command used to call the function

Arguments

S

array of available configurations (n x TT x r) with categories starting from 0 (use NA for missing responses)

X1

matrix of covariates affecting the initial probabilities (n x nc1)

X2

array of covariates affecting the transition probabilities (n x TT-1 x nc2)

yv

vector of frequencies of the available configurations

k

number of latent states

start

type of starting values (0 = deterministic, 1 = random, 2 = initial values in input)

tol

tolerance level for checking convergence of the algorithm

maxit

maximum number of iterations of the algorithm

param

type of parametrization for the transition probabilities ("multilogit" = standard multinomial logit for every row of the transition matrix, "difflogit" = multinomial logit based on the difference between two sets of parameters)

Psi

intial value of the array of the conditional response probabilities (mb x k x r)

Be

intial value of the parameters affecting the logit for the initial probabilities (if start=2)

Ga

intial value of the parametes affecting the logit for the transition probabilities (if start=2)

fort

to use fortran routine when possible (FALSE for not use fortran)

output

to return additional output (V,PI,Piv,Ul)

out_se

to compute the information matrix and standard errors

fixPsi

TRUE if Psi is given in input and is not updated anymore

Author

Francesco Bartolucci, Silvia Pandolfi, University of Perugia, http://www.stat.unipg.it/bartolucci

References

Bartolucci, F., Farcomeni, A. and Pennoni, F. (2013) Latent Markov Models for Longitudinal Data, Chapman and Hall/CRC press.