[R] nls with some coefficients fixed
Gabor Grothendieck
ggrothendieck at gmail.com
Tue Jul 20 18:42:23 CEST 2010
On Tue, Jul 20, 2010 at 9:58 AM, <nashjc at uottawa.ca> wrote:
> For nls, the fixing (or masking) of parameters is not, to my knowledge,
> possible.
>
> This is something I've been trying to get in such routines for over 2
> decades. Masks are
> available, but not yet well documented, in Rcgmin and Rvmmin packages.
> However, these use
> an optim() style approach, which is quite different from nls(). If there's
> sufficient
> interest and some collaboration, I'd be willing to have a go at providing
> such
> functionality, but it would take quite a bit of work to provide the full
> capability of nls().
>
You can optimize over b while fixing m like this:
m <- 1
nls(demand ~ m + b * Time, BOD, start = c(b = 1))
More information about the R-help
mailing list