0

I am trying to estimate a complex model with nlsLM() in R package minpack.lm. It goes like this:

nlc <- nls.lm.control(maxiter = 10000, maxfev = 10000)

nlsLM(formula = log(demand+0.001) ~ Diff.model.log(m,pin,q,lambda1,lambda2,goal,length,time),
      data = projects_long,
      start = c(lambda1 = lambda1, lambda2 = lambda2, m = m, pin = pin, q = q),
      upper = c(5,5,Inf,1,1), lower = c(-Inf,0,0,0,0),
      algorithm = "port", control = nlc)

You can see I placed lower bounds 0 on four out of the five parameters that I was trying to estimate, and they seem to be binding indeed: all sets of parameters I got at the minimum did include zeros...

But in fact, in my applications the parameters being zero is not interpretable and I'd rather them strictly positive. I was wondering how could I specify in the code such that the bound is not reachable?

Thanks very much for any guidance here!

shenglih
  • 879
  • 2
  • 8
  • 18
  • @ZheyuanLi, thanks for your comments! Yes I ran my code and all of my results hit the zero bound squarely.... – shenglih Oct 23 '16 at 13:40
  • In that case an extremum likely does not exist. If you use an arbitrary small number as the lower bound it will likely be driven down to it but you could have used an even smaller number and it would have been driven down to it with an even lower residual sum of squares. – G. Grothendieck Oct 23 '16 at 16:12
  • @G.Grothendieck, thanks for your reply!! Yes I realized I actually do not know if 0 is the asymptote... if it's not, is it still the case? – shenglih Oct 23 '16 at 16:15
  • Yes, it is still the case. – G. Grothendieck Oct 23 '16 at 16:28

0 Answers0