R/gdina_proc_define_model_parameters.R

Defines functions gdina_proc_define_model_parameters

## File Name: gdina_proc_define_model_parameters.R
## File Version: 0.06

gdina_proc_define_model_parameters <- function( dat.items, q.matrix, rule, HOGDINA, G )
{
    b.attr <- a.attr <- NULL
    I <- nrow(dat.items)   # number of persons
    J <- ncol(dat.items)   # number of items
    K <- ncol(q.matrix)       # number of attributes
    dat.items <- as.matrix(dat.items)
    q.matrix <- as.matrix(q.matrix)
    if ( length(rule)==1){
        rule <- rep( rule, J )
    }

    if (HOGDINA >=0){
        b.attr <- a.attr <- matrix( 0, nrow=K, ncol=G )
    }
    #--- OUTPUT
    res <- list(rule=rule, dat.items=dat.items, q.matrix=q.matrix, a.attr=a.attr, b.attr=b.attr,
                I=I, J=J, K=K )
    return(res)
}

Try the CDM package in your browser

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

CDM documentation built on Aug. 25, 2022, 5:08 p.m.