I think Michael might be aware of this, but was hoping that the formula 
interface was as flexible as in R, which it is not. I believe there used to 
be support for more transformations in ~, but it was removed.

On Saturday, June 25, 2016 at 1:12:27 PM UTC+2, Douglas Bates wrote:
>
> 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