Polynomial Regression over multiple predictors in R -
how can fit polynomial regression on dataframe's variables? it linear regression, do:
lm.fit = lm(response~., data=dataset, subset=train)
but if want 2-nd (or higher) grade fit, cannot use poly()
follows:
lm.fit = lm(reads_avg~poly(., i), data=dataset, subset=train)
in particular, poly doesn't seem accept point (.
) input.
Comments
Post a Comment