R/SRM_COMPUTE_SEM_SIGMA_COMPUTATION.R

Defines functions SRM_COMPUTE_SEM_SIGMA_COMPUTATION

## File Name: SRM_COMPUTE_SEM_SIGMA_COMPUTATION.R
## File Version: 0.05


SRM_COMPUTE_SEM_SIGMA_COMPUTATION <- function(B, LAM, PHI, PSI)
{
    if ( ! is.null(B) ){
        IB <- diag(1, nrow(B) )
        W <- solve( IB - B )
        LAM_W <- LAM %*% W
    } else {
        LAM_W <- LAM
    }
    SIGMA <- LAM_W %*% PHI %*% t(LAM_W) + PSI
    return(SIGMA)
}

Try the srm package in your browser

Any scripts or data that you put into this service are public.

srm documentation built on Nov. 3, 2022, 5:06 p.m.