Learn R Programming

influence.SEM (version 2.3)

bollen.loglik: 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, \(\Sigma(\theta)\).

Value

Returns the Log-likelihood.

Details

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

References

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

See Also

Likedist

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab