s-news
[Top] [All Lists]

Re: [S] NonLinear Least Squares Regression

To: "Suzanne Szak" <szak@ncbi.nlm.nih.gov>
Subject: Re: [S] NonLinear Least Squares Regression
From: Douglas Bates <bates@stat.wisc.edu>
Date: 21 Sep 2000 12:34:59 -0500
Cc: <S-news@wubios.wustl.edu>
In-reply-to: "Suzanne Szak"'s message of "Thu, 21 Sep 2000 12:49:28 -0400"
References: <000601c023eb$e8171f10$0f170e82@suzanne.nlm.nih.gov>
Sender: owner-s-news@wubios.wustl.edu
User-agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7
"Suzanne Szak" <szak@ncbi.nlm.nih.gov> writes:

> With the data shown below, I'm trying to find a least squares fit (using the
> function nls) using the formula:
> 
> CV = sqrt(S^2/U2 + F^2)
> 
> using the starting parameters S=0.03 and F=6e-008.

So the contribution of F to the sum is on the order of 10^(-15), which
gets lost in the roundoff.

> I continue to get the error "singular gradient matrix".  What does this
> error indicate?  I've tried changing the starting parameters w/o any luck.
> In fact, the S and F values above were determined using Excel.

The error message indicates that the gradient matrix (derivative of
the predicted response with respect to the parameters - a matrix with
48 rows and 2 columns in your case) is computationally singular.  The
derivative of the response with respect to F is essentially zero.

Notice that the non-zero values of CV range from 0.012 up to 1.2.  One
of the assumptions when using nonlinear least squares is that the
variability in the response is approximately constant over the range
of the observed responses.  This seems unlikely here.  You may want to
consider transforming the response in some way.  Even then it is
unlikely that you will be able to compute a meaningful estimate of F.
Your observations 6 and 30
             U2          CV
 6 1.4929143669 0.000000000
30 1.4271015812 0.024381877
are at roughly the same U2 values but have CV values that differ by
about 0.025.  It is not reasonable to expect to estimate an additive
shift parameter that is on the order of 10^(-8).
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>