mlsem: 'mlsem' returns expression of log-likelihood for joint normal...

Description Usage Arguments Value Examples

Description

mlsem returns expression of log-likelihood for joint normal distribution, for maximum likelihood (ML), Simultaneous Equations Models (SEM) variant.

Usage

1
mlsem(cheqs0, fixed_term = TRUE)

Arguments

cheqs0

Strings defining equations of errors.

fixed_term

if TRUE fixed term -(k/2)*log(2*pi) (k number of equations) is included

Value

List with LL expressions of joint normal distribution, first element is string with expression for derivative calculations, the second - string for evaluation.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# normal distribution
eq_c <- c("Tw ~ ((((PH) + (tw)) * (ta - Tc) + Ec/w * (1 + (tw)) + sqrt((Ec/w *(1 + (tw)) +
(ta - Tc) * ((PH) + (tw)))^2 - 4 * Ec/w * (ta -Tc) * (tw) * (1 + (PH) + (tw))))/(2 * (1 + (PH)
 + (tw))))",
"Tf1 ~ (th1) *(Tw - Tc)",
"Ef1 ~ (ph1)/(PH) * (w * Tw - Ec)")
parl <- c("tw","PH","th1","ph1")
para_cont <- get_par(parl, eq_c)
cheqs0 <- para_cont$cheqs0
res <- mlsem(cheqs0, fixed_term=FALSE)

nmm documentation built on Jan. 7, 2021, 5:10 p.m.

Related to mlsem in nmm...