R/getPTLExpectedCounts.R

getPTLExpectedCounts <- function(alpha,beta,gamma,bin_limits,ntrials){
        counts <- rep(0,length(bin_limits)-1)
        if(beta>0){
                for(i in 1:length(counts)){
                        counts[i] <- pPTL(q=bin_limits[i+1],alpha=alpha,beta=beta,gamma=gamma)-pPTL(q=bin_limits[i],alpha=alpha,beta=beta,gamma=gamma)
                }
        }
        counts*ntrials
}

Try the LCA package in your browser

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

LCA documentation built on May 2, 2019, 8:26 a.m.