R/tam_np_2pl_grad_fn.R

Defines functions tam_np_2pl_grad_fn

## File Name: tam_np_2pl_grad_fn.R
## File Version: 0.17

tam_np_2pl_grad_fn <- function(x, nik_ii, par0, index, desmat, eps0=1e-7,
    target_fct=2)
{
    probs <- tam_np_2pl_irf_probs(x=x, par0=par0, index=index, desmat=desmat)
    m1 <- nik_ii[1,] * probs[2,] - nik_ii[2,] * probs[1,]
    grad <- 2*tam_colSums(desmat[,index] * m1 )
    return(grad)
}

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.