Istvan Gabor Hatvani
Istvan Gabor Hatvani

Reputation: 171

Why are polynomial multiple regression coefficients missing in poly?

I ran a polynomial multiple regression in R using poly, and in the output the coefficients of some combinations of the two variables (Unc and Window) are seem to be missing, and I cannot get my head around it.

The input data can be downloaded from here.

The code I used in the following: per_lm=lm(formula = variable ~ polym(Unc, Window, degree = 4, raw = TRUE), data = mdata3)

and the output coefficients can be seen in the picture below.

Obtained coefficients

You can see that combinations such as 2,3; 4,1; 4,2; 4,3; or 1,4 etc. are missing. Does anyone have any idea why can this happen? I will have to extract the equation of the surface determined by the coefficients to use it in a separate program written by a colleague.

If I consider the "missing" combinations as zero coefficients I cannot reproduce the fitted surface illustrated here, where the Period=variable in the input data file attached above. I will have to use the equation of this surface in a separate software that we are writing. Thank you for any ideas.

Upvotes: 1

Views: 208

Answers (1)

Roland
Roland

Reputation: 132651

It follows the definition for the degree of a bivariate polynomial consistent with this equation:

formula of a bivariate polynomial where n is the degree.

According to this definition 4,1 can only occur in a >= fifth degree polynomial.

Upvotes: 2

Related Questions