powered by
Internal function, called by Likedist.
Likedist
bollen.loglik(N, S, Sigma)
Sample size.
Observed covariance matrix.
Model fitted covariance matrix, \(\Sigma(\theta)\).
Returns the Log-likelihood.
The log-likelihood is computed by the function bollen.loglik using the formula 4B2 described by Bollen (1989, pag. 135).
bollen.loglik
Bollen, K.A. (1989). Structural Equations with latent Variables. New York, NY: Wiley.
# 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