Re: [R] optim works on command-line but not inside a function

2010-11-03 Thread Berend Hasselman
Damokun wrote: > > Dear all, > > I am trying to optimize a logistic 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

Re: [R] optim works on command-line but not inside a function

2010-11-03 Thread Jonathan P Daily
kun To: r-help@r-project.org Date: 11/03/2010 10:19 AM Subject: [R] optim works on command-line but not inside a function Sent by: r-help-boun...@r-project.org Dear all, I am trying to optimize a logistic function using optim, inside the following functions: #Estimating a and b from thetas

[R] optim works on command-line but not inside a function

2010-11-03 Thread Damokun
Dear all, I am trying to optimize a logistic 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.llZetaLa