Tag Info

Hot answers tagged

1

The R code is correct. You could also use the I() operator. You can look here on page 53. The code then would be lm(stock~market+I(market^2)+I(market^3), data=example) EDIT: going more into detail: Doing the above you define regressors $market^2$ and $market^3$. The coefficients will be calculated the usual way (covariance of response with the regressors ...



Only top voted, non community-wiki answers of a minimum length are eligible