search for: prof_cut

Displaying 2 results from an estimated 2 matches for "prof_cut".

2006 Jul 20
2
Timing benefits of mapply() vs. for loop was: Wrap a loop inside a function
...n 1:length(items)) like.mat[i, ] <- pcm(theta, items[[i]], score[[i]]) like.mat } # turn this off for now #like.mat <- function(score, items, theta){ #matrix(mapply(pcm,rep(theta,length(items)),items,score),ncol=length(the ta),byrow=TRUE) #} class.numer <- function(score,items, prof_cut, mu=0, sigma=1, aboveQ){ gauss_numer <- gauss.quad(49,kind="laguerre") if(aboveQ==FALSE){ mat <- rbind(like.mat(score,items, (prof_cut-gauss_numer$nodes)), dnorm(prof_cut-gauss_numer$nodes, mean=mu, sd=sigma)) } else { mat <- rbind(like.mat(score,items, (gaus...
2006 May 05
0
Spline integration & Gaussian quadrature (was: gauss.quad.prob)
...s to accomplish this, and any suggestions would be very much appreciated. library(statmod) rasch <- function(b,theta){ 1 / (1 + exp(outer(b,theta,'-'))) } like.mat <- function(x,b,theta){ rasch(b, theta)^x * (1 - rasch(b,theta))^(1-x) } class.numer <- function(x,b, prof_cut, mu=0, sigma=1, aboveQ){ gauss_numer <- gauss.quad(49,kind="laguerre") if(aboveQ==FALSE){ mat <- rbind(like.mat(x,b, (prof_cut-gauss_numer$nodes)), dnorm(prof_cut-gauss_numer$nodes, mean=mu, sd=sigma)) } else { mat <- rbind(like.mat(x,b, (gauss_numer$nodes+p...