Re: [R] nls() syntax

2020-12-11 Thread Rolf Turner
On Fri, 11 Dec 2020 19:20:26 -0500 Gabor Grothendieck wrote: > The start= argument should be as follows: > > nls(y ~ x/(x - a[z]),start=list(a = strt),data=xxx) Nya-ha! I, uh, clearly wasn't thinking clearly! (Feel a bit *duh* now!) Thanks Gabor. cheers, Rolf > > On Fri, Dec 11, 2020

Re: [R] nls() syntax

2020-12-11 Thread Duncan Murdoch
On 11/12/2020 6:50 p.m., Rolf Turner wrote: I want to fit a model y = x/(x-a) where the value of a depends on the level of a factor z. I cannot figure out an appropriate syntax for nls(). The "parameter" a (to be estimated) should be a vector of length equal to the number of levels of z. I t

Re: [R] nls() syntax

2020-12-11 Thread Gabor Grothendieck
The start= argument should be as follows: nls(y ~ x/(x - a[z]),start=list(a = strt),data=xxx) On Fri, Dec 11, 2020 at 6:51 PM Rolf Turner wrote: > > > > I want to fit a model y = x/(x-a) where the value of a depends > on the level of a factor z. I cannot figure out an appropriate > syntax for

[R] nls() syntax

2020-12-11 Thread Rolf Turner
I want to fit a model y = x/(x-a) where the value of a depends on the level of a factor z. I cannot figure out an appropriate syntax for nls(). The "parameter" a (to be estimated) should be a vector of length equal to the number of levels of z. I tried: strt <- rep(3,length(levels(z)) names(