Re: [R] question about nls

2013-03-15 Thread Prof J C Nash (U30A)
I decided to follow up my own suggestion and look at the robustness of nls vs. nlxb. NOTE: this problem is NOT one that nls() would usually be applied to. The script below is very crude, but does illustrate that nls() is unable to find a solution in >70% of tries where nlxb (a Marquardt approac

Re: [R] question about nls

2013-03-15 Thread Prof J C Nash (U30A)
As Gabor indicates, using a start based on a good approximation is usually helpful, and nls() will generally find solutions to problems where there are such starts, hence the SelfStart methods. The Marquardt approaches are more of a pit-bull approach to the original specification. They grind aw

Re: [R] question about nls

2013-03-15 Thread Gabor Grothendieck
On Fri, Mar 15, 2013 at 9:45 AM, Prof J C Nash (U30A) wrote: > Actually, it likely won't matter where you start. The Gauss-Newton direction > is nearly always close to 90 degrees from the gradient, as seen by turning > trace=TRUE in the package nlmrt function nlxb(), which does a safeguarded > Mar

Re: [R] question about nls

2013-03-15 Thread Prof J C Nash (U30A)
27 -0400 From: Gabor Grothendieck To: meng Cc: R help Subject: Re: [R] question about nls Message-ID: Content-Type: text/plain; charset=ISO-8859-1 On Thu, Mar 14, 2013 at 5:07 AM, meng wrote: >Hi,all: >I met a problem of nls. > >My data: >xy >60 0.8 >80 6.5 >100

Re: [R] question about nls

2013-03-14 Thread Gabor Grothendieck
On Thu, Mar 14, 2013 at 5:07 AM, meng wrote: > Hi,all: > I met a problem of nls. > > My data: > xy > 60 0.8 > 80 6.5 > 100 20.5 > 120 45.9 > > I want to fit exp curve of data. > > My code: >> nls(y ~ exp(a + b*x)+d,start=list(a=0,b=0,d=1)) > Error in nlsModel(formula, mf, start, wts) : > sin

[R] question about nls

2013-03-14 Thread meng
Hi,all: I met a problem of nls. My data: xy 60 0.8 80 6.5 100 20.5 120 45.9 I want to fit exp curve of data. My code: > nls(y ~ exp(a + b*x)+d,start=list(a=0,b=0,d=1)) Error in nlsModel(formula, mf, start, wts) : singular gradient matrix at initial parameter estimates I can't find out

Re: [R] Question about NLS model

2013-02-07 Thread S Ellison
Thanks, Ellison. Another question is if this p-value is a good parameter to test if the fitting is good, Absolutely not. *** This email and any attachments are confidential. Any use, copying or disclosure other than by the intende

Re: [R] Question about NLS model

2013-02-07 Thread Bert Gunter
Liang: In nonlinear models especially (and more generally, also), "small" p values are not reliable indicators of whether a fit is or is not"good." I would strongly suggest that you consult with your local statistician -- this is a (complicated, as it depends on the meaning of "good") statistical

Re: [R] Question about NLS model

2013-02-07 Thread Liu, Liang
Thanks, Ellison. Another question is if this p-value is a good parameter to test if the fitting is good, as you this test is only for the null that the coefficient is 0 (a is 0 in y=exp(a*x), right?)? On Thu, Feb 7, 2013 at 10:48 AM, S Ellison wrote: > > > > After applying the NLS for a model l

Re: [R] Question about NLS model

2013-02-07 Thread S Ellison
> After applying the NLS for a model like y=exp(a*x), and I get > a result showing the summary as: > Estimate Std. Error t value Pr(>|t|) > 2.6720 1.4758 1.811 0.3212 > > My question is what this t-statistics tests? And what's the > meaning of Pr? t is (estimate/std.err) and can be us

[R] Question about NLS model

2013-02-06 Thread Liu, Liang
After applying the NLS for a model like y=exp(a*x), and I get a result showing the summary as: Estimate Std. Error t value Pr(>|t|) 2.6720 1.4758 1.811 0.3212 My question is what this t-statistics tests? And what's the meaning of Pr? New to R. Thanks. [[alternative HTML version d