[R] mulitple mixed regression with spline

james lumley jalumley at gmail.com
Fri Jun 24 10:42:08 CEST 2005


Hi, I'm looking to implement a regression with mixed terms. I have 2
biological endpoints for a dataset of n=77, one linearly related and
the other fits a spline.  I want to combine these two terms in a
linear regression for prediction, then apply the model to a test set.

this works fine, good r2 and I've graphed the spline.
m1<-lm(y~x1,data=train)
m2<-smooth.spline(x2,y); (spl)

what i want is
y=x+bilin(x2)

any tips? sorry, fairly new user.

J.




More information about the R-help mailing list