R/rm_sdt_calc_gradient_likelihood_item_llgrad.R

Defines functions rm_sdt_calc_gradient_likelihood_item_llgrad

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

rm_sdt_calc_gradient_likelihood_item_llgrad <- function(logprob_D1, nik.item, diffindex, K)
{
    ll <- rowSums( logprob_D1[,1,] * nik.item[,1,] )
    for (kk in 2:(K+1) ){
        ll <- ll + rowSums( logprob_D1[,kk,] * nik.item[,kk,] )
    }
    ll_grad <- ll
    ll_grad <- rowsum(ll_grad, diffindex )
    ll_grad <- ll_grad[ rownames(ll_grad) > 0, 1 ]
    return(ll_grad)
}

Try the sirt package in your browser

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

sirt documentation built on Aug. 11, 2023, 5:07 p.m.