View source: R/bollen.loglik.R
| bollen.loglik | R Documentation | 
Internal function, called by Likedist. 
bollen.loglik(N, S, Sigma)
| N | Sample size. | 
| S | Observed covariance matrix. | 
| Sigma | Model fitted covariance matrix,  | 
The log-likelihood is computed by the function bollen.loglik using the formula 4B2 described by Bollen (1989, pag. 135).
Returns the Log-likelihood.
Massimiliano Pastore, Gianmarco Altoe'
Bollen, K.A. (1989). Structural Equations with latent Variables. New York, NY: Wiley.
Likedist
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.