# multiple regression if one corrleation variable is linear, other is nonlinear

#### goolian

##### New Member
Hello,

I am working on soil biology. I have a data set of soil CO2 emissions (dependant variable), with a number of other measured variables (independents).

I expect that one of the independant variables (A) is a straight linear relationship. But expect that another variable (B), is some kind of polynomial shape, probably quadratic or something.

Is there some kind of analysis i could do to sum up these relationships?

Additional info: I have already done a linear mulitple regression, it correlates variable A significantly, but not B. But playing around with it, i have found that if i split the dataset in half around the limit of the curve for variable B, then run multiple regressions on both partial data sets, i get significant linear corrleations for variable B (one is positive, one is negative. See the picture which is a rough drawing of what i have.

I have a number of other variables too, they dont correlate significantly but i want to include them anyway because it completes the story.

#### Phaedrus

##### New Member
If you want to keep it simple you could try using linear splines for this in such a way one coefficient takes the values of your independent variable for the "increasing" part of the scatterplot, and another coefficient takes the rest of values. By "splicing" the variable in this way you will get coefficients fitting linear relationships, although you could also try some transformation on the independent variable B (and then you could check the Bayesian Information Criterion for all your models to make your mind).

#### Karabiner

##### TS Contributor
I expect that one of the independant variables (A) is a straight linear relationship. But expect that another variable (B), is some kind of polynomial shape, probably quadratic or something.
You could consider a model
CO2 = b0 + b1*(B) + b2*(B)² + b3*(B)³ + error.

You will probably have to calculate two new variables
first, (B)² = (B) * (B), (B)³ = (B)*(B)*(B) .

Regression weights b2 and b3 represent the possible
quadratic and cubic influences of (B) on CO2.

With kind regards

K.