Skip to content

automated polynomial regression

5 messages · Luc Villandre, Bert Gunter, Dieter Wirz +1 more

#
Dear all -
We perform some measurements with a machine that needs to be
recalibrated. The best calibration we get with polynomial regression.
The data might look like follows:
Call:
lm(formula = true_y ~ m_y + m_y_2 + m_y_3)

Coefficients:
(Intercept)          m_y        m_y_2        m_y_3
  1.646e+00    1.252e-01    2.340e-03   -9.638e-06

Now I can get the real result with
But I have to put the values "by hand" into the polynom.

Isn't there an easier, more direct way, or at least , is there a way
to access the coefficients of lm() for further calculations?

Thanks
Dieter
#
Dieter Wirz wrote:
Hi Dieter,

The lm() function will create an object with members that can easily be 
accessed. Just save the result of your regression in a variable and 
output the needed quantity. For example,
## Now, what I believe you're looking for ;

mylm$coefficients ;


Cheers,
#
-- but it is preferable to use the appropriate access functions:

coef(mylm)

?coef

Bert Gunter
Nonclinical Biostatistics
467-7374

  
## Now, what I believe you're looking for ;

mylm$coefficients ;


Cheers,
#
Thanks Bert and Luc!
Sometimes the solution is close, but I did not find it....
I always tried mylm$Coefficients... Stupid /me.
-didi

BTW: many thanks to all developers of R. IMHO R is one of the most
outstanding free projects!
On Thu, May 14, 2009 at 7:07 PM, Bert Gunter <gunter.berton at gene.com> wrote: