Quadratic formula in mixed linear model

30 views
Skip to first unread message

Ada C

unread,
Nov 7, 2022, 8:08:16 AM11/7/22
to pystatsmodels
I wonder how to express a quadratic formula in mixed linear model?
If I want to fit a model: Height ~ age + age^2, how should I express age^2 in stats? In R, ploy(age, 2) should work for such model. I've tried ^, ploy() and I() but all of them arise error. ** would not cause an error, but the params does not has the coefficient for the term age^2. I didn't find similar example in document.
Thanks a lot!

David Shin

unread,
Nov 7, 2022, 7:47:34 PM11/7/22
to pystatsmodels

Ada C

unread,
Nov 7, 2022, 9:48:20 PM11/7/22
to pystatsmodels
Oh yes, it works. Thanks very much.
Reply all
Reply to author
Forward
0 new messages