R/rm_sdt_fill_init_partable.R

Defines functions rm_sdt_fill_init_partable

## File Name: rm_sdt_fill_init_partable.R
## File Version: 0.11


rm_sdt_fill_init_partable <- function(partable, par_index, tau.item, a.item,
    c.rater, d.rater, type)
{
    #--- collect parameters
    if( type=='item' ){
        pars <- list( tau.item=tau.item, a.item=a.item)
    } else {
        pars <- list( c.rater=c.rater, d.rater=d.rater)
    }
    #--- inits
    for (pp in names(pars)){
        par_pp <- par_index[[pp]]
        if ( length(par_pp) > 0 ){
            partable[ par_pp, "value" ] <- as.vector( pars[[ pp ]] )
        }
    }
    #-- output
    return(partable)
}

Try the sirt package in your browser

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

sirt documentation built on May 29, 2024, 8:43 a.m.