On Fri, Feb 10, 2012 at 11:40:57PM -0600, FU-WEN LIANG wrote: > Thanks for your suggestion. > I did read the manual but it seems those examples set boundaries for every > parameter. I have no idea how to set bound for only one parameter(in my > case, only for theta[21]). I tried adding > "method='L-BFGS-B',lower=c(rep(inf,20),-1),upper=c(rep(inf,20),1)", but got > this error "object 'inf' not found". I thought for those unconstrained
Hi. Names in R are case sensitive. The infinity is "Inf", not "inf". > parameters I can set them as (-inf, inf), but the manual says using > L-BFGS-B method, the estimated parameters should be finite numbers. > My constrain on theta[21] is " -1 < theta[21] < 1" > For those unconstrained parameters, how do I free them? If the bound cannot be -Inf and Inf, try -1e308 and 1e308. This is close to the bounds of the range of numeric values. Hope this helps. Petr Savicky. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.