R/tam_mml_person_EAP_rel.R

Defines functions tam_mml_person_EAP_rel

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

tam_mml_person_EAP_rel <- function(EAP, SD.EAP, pweights=NULL)
{
    if (is.null(pweights)){
        pweights <- rep(1, length(EAP) )
    }
    EAP.variance <- weighted_mean( EAP^2, pweights ) - ( weighted_mean( EAP, pweights ) )^2
    EAP.error <- weighted_mean( SD.EAP^2, pweights )
    EAP.rel <- EAP.variance / ( EAP.variance + EAP.error )
    return(EAP.rel)
}

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.