[R] Generating equation problem

nntx sheldon.qiu at okstate.edu
Wed Apr 10 23:46:41 CEST 2013


I am wondering if there is any function or command that could generate a
equation automatically from the fitted results? 
For example, 

> x<-seq(1:20)
> y<-rnorm(20)
> z<-lm(y~poly(x,4))
> z

Call:
lm(formula = y ~ poly(x, 4))

Coefficients:
(Intercept)  poly(x, 4)1  poly(x, 4)2  poly(x, 4)3  poly(x, 4)4  
    0.00557      1.71296      0.55448     -0.10773     -1.45126  

Is there any way that I can directly get the equation between y and x for
the fitted curve? Thank you. 




--
View this message in context: http://r.789695.n4.nabble.com/Generating-equation-problem-tp4663931.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list