Learn R Programming

LMest (version 2.4.5)

prob_post_cov_cont: Compute posterior probabilities.

Description

Function that uses backward recursion to compute posterior probabilities (internal funtion).

Usage

prob_post_cov_cont(Y, yv, Mu, Si, Piv, PI, Phi, L, pv, der = FALSE,
       dlPhi = NULL, dlPiv = NULL, dlPI = NULL, dlL = NULL, dlL2 = NULL, dlpv = NULL)

Arguments

Y

array of continuous outcomes

yv

corresponding vector of frequencies

Mu

matrix of conditional means for the response variables

Si

var-cov matrix common to all states

Piv

initial probability matrix

PI

transition probability matrices

Phi

matrix of the conditional probabilities of the observed response configurations

L

matrix of the forward probabilities

pv

vector of marginal probabilities

der

to compute derivatives

dlPhi

matrix of derivatives of the log-conditional probabilities of the observed response configurations

dlPiv

matrix of derivatives of the logarithm of the intial probabilities

dlPI

matrix of derivatives of the logarithm of the transition probabilities

dlL

matrix of derivatives of the log-forward probabilities

dlL2

matrix of second derivatives of the log-forward probabilities

dlpv

matrix of derivatives of the log-marginal probabilities

Value

U

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

V

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

dlU

matrix of derivatives of the logarithm of U

dlV

matrix of derivatives of the logarithm of V