[R] Simple linear regression
Martin Maechler
maechler at stat.math.ethz.ch
Thu Jul 10 14:20:22 CEST 2003
>>>>> "KKWa" == Ko-Kang Kevin Wang <kwan022 at stat.auckland.ac.nz>
>>>>> on Thu, 10 Jul 2003 23:00:00 +1200 (NZST) writes:
KKWa> Try: ?lm
no. see below
KKWa> On 10 Jul 2003, Gorazd Brumen wrote:
>> Date: 10 Jul 2003 12:54:46 +0200 From: Gorazd Brumen
>> <gbrumen at student.ethz.ch> To: R-help at stat.math.ethz.ch
>> Subject: [R] Simple linear regression
>>
>> Dear all,
>>
>> My friend wants to fit a model of the type
>>
>> z = a x^n y^m + b,
>>
>> where x, y, z are data and a, b, n, m are unknown
>> parameters.
>>
>> How can he transform this to fit in the linear regression
>> framework? Any help would be appreciated.
He can't. When all 4 a, b, n, m are parameters, this is a
non-linear regression problem. --> Function nls()
Now, effectively 2 of the 4 are linear, 2 are non linear;
such a problem is denoted as `` partially linear least-squares ''
In such a case it's quite important (for efficiency and
inference reasons) to make use of this fact.
---> use nls(...., method = "plinear" , ....)
Regards,
Martin Maechler <maechler at stat.math.ethz.ch> http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum LEO C16 Leonhardstr. 27
ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND
phone: x-41-1-632-3408 fax: ...-1228 <><
More information about the R-help
mailing list