Skip to content
Back to formatted view

Raw Message

Message-ID: <50d1c22d0612231336p4811fb8ct4862e98b3561bd2d@mail.gmail.com>
Date: 2006-12-23T21:36:09Z
From: ivo welch
Subject: simple NLS query
In-Reply-To: <Pine.LNX.4.64.0612231251140.8986@tajo.ucsd.edu>

duh!  thanks.

  summary(nls( y ~ 1/(1+b*x), data = d, start= list(b=0.5)))

works, of course.

/iaw


On 12/23/06, Charles C. Berry <cberry at tajo.ucsd.edu> wrote:
>
>
> See the nls help page:
>
> Arguments
>
>         formula a nonlinear model formula including variables and parameters.
>
> and you have
>
>         y ~ 1/(1+x)
>
> which does not seem to match the requirement of the help page.
>
> What are the unknowns for which you were hoping nls would solve??
>
> On Sat, 23 Dec 2006, ivo welch wrote:
>
> > dear R experts:  I am trying to orient myself using nls().  so, I am
> > just trying to copy and adapt an example in the nls() function:
> >
> >  > d= data.frame( y= runif(10), x= runif(10) )
> >  > nls( y ~ 1/(1+x), data = d, start= list(x=0.5,y=0.5), trace=TRUE)
> >  Error in n%%respLength : non-numeric argument to binary operator
> >
> > the error message seems internal, so it would be nicer if there was a
> > better error message.  I presume my mistake is so basic that an R
> > expert sees the problem in 1 second.
> >
> > (if I manage to figure this one out, my next step will be to learn how
> > I can get [presumably asymptotic ML] standard errors on estimated
> > coefficients.
>
> Look at the help page for nls. Specifically under 'Details'.
>
>
> I hope I am looking in the right direction with the
> > nls() function.)
> >
> > advice appreciated.
> >
> > regards,
> >
> > /ivo
> >
> > ______________________________________________
> > R-help at stat.math.ethz.ch 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.
> >
>
> Charles C. Berry                        (858) 534-2098
>                                           Dept of Family/Preventive Medicine
> E mailto:cberry at tajo.ucsd.edu            UC San Diego
> http://biostat.ucsd.edu/~cberry/         La Jolla, San Diego 92093-0717
>
>
>