Learn R Programming

LMest (version 2.4.5)

lk_obs_manifest: Compute the observable log-likelihood of the LM model with covariates in the measurement model

Description

Function that computes the observable log-likelihood of the LM model with covariates in the measurement model (internal use).

Usage

lk_obs_manifest(par, Y, Xd, yv, indn, lev, k, sup, G2, IPI, mod, outp = FALSE)

Arguments

par

vector of regression parameters

Y

matrix of response variables

Xd

matrix of covariates

yv

vector of frequencies of response configurations

indn

index of the design matrix for each unit

lev

vector containing the number of levels of each variable

k

number of latent states

sup

support points

G2

design matrix

IPI

index of the transition matrix elements

mod

model (0 = LM with stationary transition, 1 = finite mixture)

outp

to compute the score of the observable log-likelihood

Value

lk

log-likelihood

U

array containing the posterior distribution of the latent states for each response configuration and each pair of consecutive time occasions

s

score of the observable log-likelihood