On Friday, June 24, 2016 at 8:39:09 AM UTC-4, Michael Borregaard wrote:
>
> Sorry for asking a question that should be super-basic, but I have looked 
> all over the internet for this for an hour now: How does one specify 
> polynomial terms in glm models?
>
> In R, I would:
>
> y ~ x + I(x^2)
>
> Thanks!
>

If you are using a DataFrame for the data source, just add a column 

df[:x2] = abs2(df[:x])

and change the formula to

y ~ 1 + x + x2

BTW, it is good practice to include the " 1 + ".  We are still considering 
changing the formula interface to require the intercept to be explicitly 
stated.
 

Reply via email to