bollen.loglik: Log-Likelihood of a sem model (Internal function).

View source: R/bollen.loglik.R

bollen.loglikR Documentation

Log-Likelihood of a sem model (Internal function).

Description

Internal function, called by Likedist.

Usage

bollen.loglik(N, S, Sigma)

Arguments

N

Sample size.

S

Observed covariance matrix.

Sigma

Model fitted covariance matrix, Σ(θ).

Details

The log-likelihood is computed by the function bollen.loglik using the formula 4B2 described by Bollen (1989, pag. 135).

Value

Returns the Log-likelihood.

Author(s)

Massimiliano Pastore, Gianmarco Altoe'

References

Bollen, K.A. (1989). Structural Equations with latent Variables. New York, NY: Wiley.

See Also

Likedist

Examples

data("PDII")
model <- "
  F1 =~ y1+y2+y3+y4
"
fit0 <- sem(model, data=PDII)
N <- fit0@Data@nobs[[1]]
S <- fit0@SampleStats@cov[[1]]
Sigma <- fitted(fit0)$cov
bollen.loglik(N,S,Sigma)

influence.SEM documentation built on May 11, 2022, 9:05 a.m.