R/tam_mml_proc_unidim_simplify.R

Defines functions tam_mml_proc_unidim_simplify

## File Name: tam_mml_proc_unidim_simplify.R
## File Version: 0.04

tam_mml_proc_unidim_simplify <- function(Y, A, G, beta.fixed)
{
    eps <- 1E-15
    YSD <- max( apply( Y, 2, stats::sd ) )
    if (YSD > eps ){
        YSD <- TRUE
    } else {
        YSD <- FALSE
    }
    Avector <- as.vector(A)
    Avector[ is.na(Avector) ] <- 0
    unidim_simplify <- TRUE
    if (G > 1){
        unidim_simplify <- FALSE
    }
    if (YSD){
        unidim_simplify <- FALSE
    }
    if ( is.null(beta.fixed) ){
        unidim_simplify <- FALSE
    }
    #--- OUTPUT
    res <- list( unidim_simplify=unidim_simplify, YSD=YSD, Avector=Avector)
    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.