# performing a regression

#### precision

##### New Member
Hi,

I have a set of measurements taken over time at regular intervals. The measurement values tend to increase over time.

I want to see if it follows a linear trend (implying it still had room to grow), or if it is more logarithmic (implying it was peaking at max level).

I did a quick linear regression using SPSS, and got a significant p value, so I suppose all that means is that the independent variable (time) is very powerful at predicting the outcome of the measurements.

However, I do not know how to obtain whether or not the measurements are "levelling off" or not. How can I do this? Can I do it with the same linear regression test?

I guess what I'm asking is... how can I check to see if my measurements better fit a linear, or logistic, regression?

#### TheEcologist

##### Global Moderator
However, I do not know how to obtain whether or not the measurements are "levelling off" or not. How can I do this? Can I do it with the same linear regression test?

I guess what I'm asking is... how can I check to see if my measurements better fit a linear, or logistic, regression?
Hi precision,

By far the easiest approach would be to compare the R-squared value you calculate (or SPSS calculates) from your linear regression with the one you obtain from running a logistic regression. If the logistic R-squared is larger you can use this as an argument that it is also a better model.

see: http://en.wikipedia.org/wiki/Coefficient_of_determination

You can also save the residuals of both models and run an ANOVA to see if the logistic truly (significantly) improves the fit. You can also calculate the log likelihood of each model and then run AIC model selection. You can also look at the Adjusted R-squared. However all these steps would be unnecessary if your logistic model contains the same amount of parameters as your linear model. If so, just compare the R-squared values.

Hope this helps

hope this helps.

#### Rounds

##### New Member
"I did a quick linear regression using SPSS, and got a significant p value, so I suppose all that means is that the independent variable (time) is very powerful at predicting the outcome of the measurements."

Not necessarily. The p-value is not valid until you check the underlying statistical assumptions. The easiest and most important is to check the residual assumptions.

In the case of time series which is what your doing this comes up alot! In fact a classic version of exactly your problem is where time looks significant and really after you stabilize the residuals it is actually the previous values in the time series that is significant and time has no significance in and of itself. You have to normalize and make stationary the residuals before the p-values have any real meaning.

You can still use these tools to build predictive models; however you should shy away from using p-values for any statements until you do that work.

This is my limited experience. I am a grad student in statistics--not a pro.

Last edited:

#### precision

##### New Member
This is my limited experience. I am a grad student in statistics--not a pro.
Well, I'm just a 4th year bio undergrad trying to do meaningful stats on his research project, so you probably know more than me.