R/tam_pv_draw_pv_normal_approximation_1dim.R

Defines functions tam_pv_draw_pv_normal_approximation_1dim

## File Name: tam_pv_draw_pv_normal_approximation_1dim.R
## File Version: 0.10

tam_pv_draw_pv_normal_approximation_1dim <- function( theta, nstud, ntheta, pv, hwt, pp)
{
    thetaM <- matrix( theta[,1], nstud, ntheta, byrow=TRUE )
    EAP <- rowSums( thetaM * hwt )
    SDPost <- sqrt( rowSums( thetaM^2 * hwt ) - EAP^2 )
    pv[,pp] <- theta1 <- stats::rnorm( nstud, mean=EAP, sd=SDPost )
    #--- OUTPUT
    res <- list( pv=pv, theta1=theta1 )
    return(res)
}

Try the TAM package in your browser

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

TAM documentation built on May 29, 2024, 2:20 a.m.