Skip to content
Prev 65626 / 398506 Next

problem using uniroot with integrate

Ken Knoblauch wrote on 3/9/2005 10:27 AM:
Ken,

Look at the argument list for ?uniroot and think "partial matching". 
You're "m" is being interpretted for "maxiter". Simply change to

dp.res <- uniroot(est.dp, interval = c(0,5), Pc = Pc, m0 = m)

and in other places for consistency and the error goes away. Of course, 
since you gave no working example, I'm not sure if other errors are 
present that I'm missing.

--sundar