Learn R Programming

LMest (version 3.1.2)

est_lm_basic_cont: Estimate basic LM model for continuous outcomes

Description

Main function for estimating the basic LM model for continuous outcomes.

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

Usage

est_lm_basic_cont(Y, k, start = 0, mod = 0, tol = 10^-8, maxit = 1000,
                  out_se = FALSE, piv = NULL, Pi = NULL, Mu = NULL, Si = NULL)

Value

lk

maximum log-likelihood

piv

estimate of initial probability vector

Pi

estimate of transition probability matrices

Mu

estimate of conditional means of the response variables

Si

estimate of var-cov matrix common to all states

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 units and time occasion

call

command used to call the function

Arguments

Y

array of continuous outcomes (n x TT x r)

k

number of latent states

start

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

mod

model on the transition probabilities (0 for time-heter., 1 for time-homog., from 2 to (TT-1) partial homog. of that order)

tol

tolerance level for convergence

maxit

maximum number of iterations of the algorithm

out_se

to compute the information matrix and standard errors

piv

initial value of the initial probability vector (if start=2)

Pi

initial value of the transition probability matrices (k x k x TT) (if start=2)

Mu

initial value of the conditional means (r x k) (if start=2)

Si

initial value of the var-cov matrix common to all states (r x r) (if start=2)

Author

Francesco Bartolucci, Silvia Pandolfi, University of Perugia (IT), 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.

Examples

Run this code
if (FALSE) {
# Example based on multivariate longitudinal continuous data


data(data_long_cont)
res <- long2matrices(data_long_cont$id,X=cbind(data_long_cont$X1,data_long_cont$X2),
      Y=cbind(data_long_cont$Y1, data_long_cont$Y2, data_long_cont$Y3))
Y <- res$YY

# fit of the Basic LM model for continuous outcomes
k <- 3
out <- est_lm_basic_cont(Y, k, mod = 1, tol = 10^-5)
summary(out)
}

Run the code above in your browser using DataLab