Re: [R] Linear Model with curve fitting parameter?

From: stephen sefick <ssefick_at_gmail.com>
Date: Fri, 01 Apr 2011 07:44:01 -0500

Setting Z=Q-A would be the incorrect dimensions. I could Z=Q/A. Is fitting a nls model the same as fitting an ols? These data are hydraulic data from ~47 sites. To access predictive ability I am removing one site fitting a new model and then accessing the fit with a myriad of model assessment criteria. I should get the same answer with ols vs nls? Thank you for all of your help.

Stephen

On Thu, Mar 31, 2011 at 8:34 PM, Steven McKinney <smckinney_at_bccrc.ca> wrote:
>
>> -----Original Message-----
>> From: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-project.org] On Behalf Of stephen sefick
>> Sent: March-31-11 3:38 PM
>> To: R help
>> Subject: [R] Linear Model with curve fitting parameter?
>>
>> I have a model Q=K*A*(R^r)*(S^s)
>>
>> A, R, and S are data I have and K is a curve fitting parameter.  I
>> have linearized as
>>
>> log(Q)=log(K)+log(A)+r*log(R)+s*log(S)
>>
>> I have taken the log of the data that I have and this is the model
>> formula without the K part
>>
>> lm(Q~offset(A)+R+S, data=x)
>>
>> What is the formula that I should use?
>
> Let Z = Q - A for your logged data.
>
> Fitting lm(Z ~ R + S, data = x) should yield
> intercept parameter estimate = estimate for log(K)
> R coefficient parameter estimate = estimate for r
> S coefficient parameter estimate = estimate for s
>
>
>
> Steven McKinney
>
> Statistician
> Molecular Oncology and Breast Cancer Program
> British Columbia Cancer Research Centre
>
>
>
>>
>> Thanks for all of your help.  I can provide a subset of data if necessary.
>>
>>
>>
>> --
>> Stephen Sefick
>> ____________________________________
>> | Auburn University                                         |
>> | Biological Sciences                                      |
>> | 331 Funchess Hall                                       |
>> | Auburn, Alabama                                         |
>> | 36849                                                           |
>> |___________________________________|
>> | sas0025_at_auburn.edu                                  |
>> | http://www.auburn.edu/~sas0025%c2                |
>> |___________________________________|
>>
>> Let's not spend our time and resources thinking about things that are
>> so little or so large that all they really do for us is puff us up and
>> make us feel like gods.  We are mammals, and have not exhausted the
>> annoying little problems of being mammals.
>>
>>                                 -K. Mullis
>>
>> "A big computer, a complex algorithm and a long time does not equal science."
>>
>>                               -Robert Gentleman
>> ______________________________________________
>> R-help_at_r-project.org 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.
>

-- 
Stephen Sefick
____________________________________
| Auburn University                                         |
| Biological Sciences                                      |
| 331 Funchess Hall                                       |
| Auburn, Alabama                                         |
| 36849                                                           |
|___________________________________|
| sas0025_at_auburn.edu                                  |
| http://www.auburn.edu/~sas0025%c2                |
|___________________________________|

Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods.  We are mammals, and have not exhausted the
annoying little problems of being mammals.

                                -K. Mullis

"A big computer, a complex algorithm and a long time does not equal science."

                              -Robert Gentleman

______________________________________________
R-help_at_r-project.org 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.
Received on Fri 01 Apr 2011 - 12:46:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 01 Apr 2011 - 20:00:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive