R/tam_mml_person_maxscore.R

Defines functions tam_mml_person_maxscore

## File Name: tam_mml_person_maxscore.R
## File Version: 0.07

tam_mml_person_maxscore <- function(resp, resp.ind=NULL)
{
    if ( is.null(resp.ind) ){
        resp.ind <- 1 - is.na(resp)
    }
    nstud <- nrow(resp)
    M1 <- apply( resp, 2, max, na.rm=TRUE)
    M1 <- matrix(M1, nrow=nstud, ncol=ncol(resp), byrow=TRUE)
    maxscore <- rowSums(  M1 * resp.ind )
    return(maxscore)
}

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.