Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Does Jasp have Polynomial Regression?

Hi everyone,,


I am new to polynomial regression, but based upon my reading of:

Kroc, E., & Olvera Astivia, O. L. (2023). The case for the curve: Parametric regression with second- and third-order polynomial functions of predictors should be routine. Psychological Methods, No Pagination Specified-No Pagination Specified. https://doi.org/10.1037/met0000629

Schönbrodt, F. (2024). Testing fit patterns with polynomial regression models. https://doi.org/10.31219/osf.io/ndggf

it seems like a skill well worth learning. The second of these papers suggests it is considered part of response surface analysis, which I know is implemented in the package. But I can't seem to actually find the area to model with a polynomial?

Apologies if I'm just completely missing the point, and this functionality is somewhere obvious, I would appreciate the pointer. If it isn't anywhere, I will gladly make the feature request.

Best wishes,


Tarandeep

Comments

  • There is no good support for polynomial regression yet, but you could use computed columns to manually create variables raised to a power and then include those in the analyses. This means the polynomials are not orthogonal, but if the order is not too large that should be okay.

    I've opened a pull request so that this can at least be done with orthogonal polynomials (see https://github.com/jasp-stats/jasp-desktop/pull/5388)

  • Hi Don,

    Thanks very much for your very quick work on adding the poly function. But (and as I said above, I'm very new to this) it seems that to take full advantage of this method we also need the ability to obtain MSE via cross validation, to determine model fit. That seems to be the way to determine which order of polynomial is most appropriate to the data in question? If so, do you want me to open another feature request for these to be integrated into their own analysis?

  • That's a good point. But how exactly that is implemented is specific to the method that is used. For example, in Bayesian linear regression, we automatically account for model complexity. In the frequentist counterpart, however, we would indeed need additional functionality to determine the order of the polynomial.

  • Ah, yes, I hadn't even considered the Bayesian option (but of course it can use polynomials!) Anyway, since you obviously have a better grasp of this can I do, I won't make the extra request on github. Super save you a job, then I'm glad to.

Sign In or Register to comment.