search for: gradzl

Displaying 1 result from an estimated 1 matches for "gradzl".

2010 Nov 03
3
optim works on command-line but not inside a function
...stic function using optim, inside the following functions: #Estimating a and b from thetas and outcomes by ML IRT.estimate.abFromThetaX <- function(t, X, inits, lw=c(-Inf,-Inf), up=rep(Inf,2)){ optRes <- optim(inits, method="L-BFGS-B", fn=IRT.llZetaLambdaCorrNan, gr=IRT.gradZL, lower=lw, upper=up, t=t, X=X) c(optRes$par[2], -(optRes$par[1]/optRes$par[2]) ) } #Estimating a and b from thetas and outcomes by ML, avoiding 0*log(0) IRT.estimate.abFromThetaX2 <- function(tar, Xes, inits, lw=c(-Inf,-Inf), up=rep(Inf,2)){ optRes <- optim(inits, method=&quot...