# Questions tagged [polynomial]

A mathematical expression w/ >1 term containing the same variable (eg, x & x^2). Polynomials are commonly used to model curvilinear relationships.

292 questions
Filter by
Sorted by
Tagged with
22 views

### Polynomial regression seems to give different coefficients depending on Python or R

When I fit a polynomial on the Boston data set with R, I seem to get different results than when I use Python. Example code with R: ...
33 views

### Polynomial Regression with too many features

I have a dataset with 10,000 datapoints for every of the 900 features and a target of 10,000 datapoints, so x = (10000, 900) and y = (10000, 1). If I plot the results for the first 100 features on the ...
29 views

### How to control for binary variables in polynomial regression?

I have a datset: ...
289 views

### Fitting a quadratic regression in R

I am trying to fit a quadratic regression model in R. Here is an example of my dataframe: ...
47 views

### Singularity issue, caused by polynomial regression, in the wald test of significance

I am trying to explain the housing sales prices and need for it to include the squared terms of some variables, for instance distance to the nearest forest, in order to capture the real effect. This ...
20 views

### How to directly know the backward selection model when independent variables are orthogonal?

According to this output, the independent variables are orthogonal. Please tell me, when doing the backward selection, why it can be directly known that it should be reduced to 5th order model?
26 views

### Equation for smoothing spline from coefficients?

If I smooth a data vector with a smoothing cubic spline my understanding is that each ‘segment’ between knots should be representable as a cubic polynomial. Is it possible to infer the equation of ...
35 views

### Linear regression of higher order polynomial with slope constraint

I am trying to constrain the coefficients on a higher order polynomial (let's say an order 6) for the curve to be decreasing. I have found this link, where the fitting of a 3rd order polynomial is ...
9 views

21 views

### Finding maximum of quadratic function that depends on other variables

I am trying to fit a model of the following form in R: yield = solar_rad + I(solar_rad ^ 2) where each observation is a field and ...
45 views

### Opening the linear regression black box

How does LinearRegression fit polynomials? I am not sure why I have to pass to the fit an array of the data where every point has been converted to Nth order ...
18 views

### When to increase the degree of polynomial regression

As I understand it, first we check the pattern of data and if it looks that it is not linear, we try to increase the degree to quadratic.If the curve of the data pattern is more abrupt, the degree of ...
19 views

### Is it possible to train an RNN to predict projectile motion?

Projectile motion is given by a function $y = -9.81 x^2 + ax + b$ for some parameters $a$ and $b$. I'll simply assume for $x$ values to be distanced by 1, so $x_t = t$. I can then easily generate ...
29 views

### Time series plots, polynomial coefficients and PCA

I have several time series plots that I have their polynomial coefficients (curve fitting using Matlab polyfit). Is it possible and valid to use Principal Component Analysis (PCA) to try to classify ...
42 views

### Perfect multicollinearity with a cubic term in the model?

I'm trying to figure out why adding a cubic term in the model doesn't guarantee a perfect multicollinearity. If $X$ is known, then $X^3$ is known in both magnitude and sign and vice versa. It may not ...
63 views

### Feature selection (backward elimination) in polynomial regression

I have a polynomial multiple (univariate) regression with 2nd degree (for example) as below. Question. When I execute backward elimination to select features, should I remove features from the ...
27 views

### Can I transform a few features to polynomial in multi regression?

Let's say I have 3 features in my ols model as below. model = sm.ols(formula='y ~ a + b + c', data=df) Question 1. If I want to transform the feature 'a' as ...
43 views

### Questions re. fitting a polynomial: Runge's phenomenon solutions

I have data on hospital treatment times. I would like to fit a polynomial to the data using least-squares. In a previous question raised before I have already been advised against this, but ...
1k views

### Can you add polynomial terms to multiple linear regression?

I am a little confused about when you should or shouldn't add polynomial terms to a multiple linear regression model. I know polynomials are used to capture the curvature in the data, but it always ...
71 views

### Can I use polynomial regression with categorical variabels? [closed]

I'm trying to learn a polynomial model of degree 2, but apparently it doesn't work well for dummy variables, as they present only 2 possible values (0 or 1) thus not being able to properly create a ...
27 views

### Are the following is a good wrap of a comparison between all linear regression types (single, multiple and polynomial)?

I am new to machine learning and it's hard to find an instructor to help you with theory based questions. If this question does not fit to this site feel free to remove it. I am comparing the 3 types ...
83 views

### Questions re. fitting a polynomial: smoothing, cross-validation, etc

I have data on hospital treatment times. I would like to fit a polynomial to the data. My data comes in 5 minute increments and it is very noisy. It looks like this: I can aggregate to a higher ...
11 views

### Finding out how change in other variables influence change in target variable

I have data in form of time series that consist 2 variables for 3 different products. First variable is quantity sold and the second is price for each month. And that is repeated for every product. So ...
49 views

### Polynomial and simple contrasts for anova

Im wondering if anyone can help me. Im trying to do a 2x16 repeated measures ANOVA with two conditions across 16 timepoints. The main effect of time came out as significant and I was interested in ...
67 views

### Why prefer poly() to I() ? Are they different? [duplicate]

A post "Fitting Polynomial Regression in R" used two ways to model the polynomial regression: (a) poly(..., ...); (b) I(...). ...
353 views

### An easy decision when to use a spline or a polynomial

I read a lot about polynomials and splines (and in case of the latter also lots of it derivates) and often some special cases were introduced to explain, mostly, why a spline is more suitable than a ...
27 views

### What is the best correlation coefficient to use in order to compare how similar two second degree polynomial functions are?

This will likely be a lament question, but then again I am a lament in the area of statistics. Please accept my apologies for that in advance. :) Suppose you have 2 data sets: Dataset 1: some values ...
24 views

### How does Polynomial Regression work? [duplicate]

My input data ...
48 views

### R - Interpretation of coefficients and written form of fitted model in lm() linear regression when using poly()

I've tried reading several resources on poly(), I'm not able to see an answer to my question. My question pertains how I might present my fitted linear model in a way that the coefficients are ...
63 views

### Poly() function in R for linear models

I am working with some data on which I used the poly() function to get 4th degree polynomials. I had one model that only had significance for the first degree, so I ...
21 views

### Polynomial Regression with grouped independent observations

I am trying to model how porosity changes across burn up levels of a fuel pellet. I have 300 observations at varying levels of burn up. The way my data is collected makes burn up appear as a ...
61 views

### How to explain the result of this polynomial equation?

Lets say that I predicted plant productivity (logy) by precipitation (logx1) and moisture content of soil (logx2). my original data gives me the best result only after taking logarithm on both side of ...
58 views

### Is it ok to use polynomial model to fit logarithmically transformed data?

Can we use polynomial regression using logarithmically transformed data. I transformed both y and x1 and x2 variables by natural log. After this, I used polynomial regression to fit. when using poly(...
187 views

### Why are polynomial activation functions not used

Why are polynomial functions bad as activations?
145 views

### If the quadratic term is significant but the linear term is not, we must add the linear term to the model too?

I have a linear mixed effect model and I add the quadratic term of time in my model and it was significant and improve the AIC & BIC of the model, but the problem is that the linear term of time ...
94 views

### Choosing a significance test, trend appears either linear or quadratic

I am testing a one-sided hypothesis of association between two variables. I want to know if I increase variable A, then will variable B also increase? For my experimental design, I increase the ...
12 views

### Response surface analysis and simple slope analysis - contradicting results

I performed a multi-level polynomial regression (two IVs, one DV) with some control variables, and also computed the response surface coefficients a1 to a4 alongside simple slope coefficients (+/- ...
679 views

### What makes linear regression with polynomial features curvy?

The following is my understanding of what happens: if I take a "two dimensional problem" e.g. I have $X$ as inputs and Y as the outcome and I add a feature $x^2$. This gives a problem an additional ...
62 views

### Polynomial regression in a circular data set

I'm working on a data set where I have a set of events per time of the day (in a 1h time slot). I made the sum of the events and plotted a bar as show below. In order to define an equation that could ...
67 views

### Polynomial Regression model fits poorly

I was reading ISLR and implemented the least squares approach for a linear regression model on the autos data set which comes with the book. For the least squares approach I used only one predictor(...
57 views

### How can I use polynomial distributed lag models for longitudinal categorical exposure?

I have SHS data from 13 time points and i want to describe the relationship between this cumulative exposure and health outcome after the 13th time point. It seems the ...
114 views

### Calculating predicted value from polynomial regression by hand

I have the following output from from R. I know we can calculate predicted values using the predict() function. How can we calculate the predicted value by hand if X=2 or 3? I'm using the below ...
15 views

### Unclear “mathematical notation” in a polynomial

Although, the Enigma here is a protocol for enhancing the privacy in blockchain; however, the question is about mathematical notation, where we want to calculate the coefficients in a polynomial. ...
48 views

### ANCOVA with Polynomial Categorical Variable

I have a homework problem that asks me to fit a one way ANCOVA model to a set of data (which I feel comfortable with). The model is represented as yij = μi + γzij + eij where i indicates ...
363 views

### Using a given polynomial formula in a lm() model in R

I am currently trying to fit a polynomial model to measurement data using the lm() function. fit_poly4 <- lm(y ~ poly(x, degree = 4, raw = T), weights = w) ...