Good afternoon!
I am performing multiple linear regression within SAS Enterprise Guide (latest version) and I have encountered some strange results. I have ten indicators that all have ten observations each and these have been normalised.
I am trying to use one dependent variable and nine predictors. However, whenever I attempt this using either code or the inbuilt wizard, I do not receive any values for Standard Error, t value or Pr >|t|, as shown below.
I am using the following code:
PROC REG DATA= 'D:\Datasets\PODS\Assignment\Raw Data\GS®\SAS LIB\argentina'; MODEL ExportsGS = ExportCost ImportCost ImportGS Trade Arrivals Revenue Contibution ServiceExp TechExp; RUN;
Interestingly, if I remove a single predictor variable (it doesn't seem to be relevant which one I drop) then I am given the results. These are the results when I drop trade:
These results are interesting because although the adjusted R² seems to suggest that the model can account for 99% of the variance in the dependent variable, NONE of the individual variables appear to be statistically significant.
I have created a scatter plot to visualise the relationships of the data, and this was as follows:
Using this scatterplot I decided to drop Trade and ImportCost and run the regression again and again got confusing results (high R² with Pr > |t| values such as '0.97', etc.,).
Interestingly, if I drop one of the strongly correlated predictors, like ImportGS, but decide to include the weakly correlated predictors, like Trade or ImportCost, my R² = 1.0, which seems statistically unlikely.
I am clearly doing something wrong in my analysis; can anyone help me get to the bottom of this issue?
It is mathematically impossible to get a standard error from data where you have 10 observations, and your regression has 9 predictor variables and an intercept. (Or, stated another way, the standard error will be zero in this case, you have fit the data perfectly) You cannot have the number of predictor variables plus intercept less than or equal to the number of observations in your data and get a standard error.
So, you need to reconsider why you are doing regression and how you are going about it.
It is mathematically impossible to get a standard error from data where you have 10 observations, and your regression has 9 predictor variables and an intercept. (Or, stated another way, the standard error will be zero in this case, you have fit the data perfectly) You cannot have the number of predictor variables plus intercept less than or equal to the number of observations in your data and get a standard error.
So, you need to reconsider why you are doing regression and how you are going about it.
Sir @PaigeMiller Requesting little help to expand on "mathematically impossible". Please bear with me if I'm asking something too simple and may sound silly. Wouldn't SE be smaller as the number of observations get larger and vice versa? Can you help me understand
The model fits perfectly, there is no standard error (or another way to say it is that the standard error is zero).
Okay got it. Sorry!
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.