Hi,
I am running proc GLM and when I run it without confounders it is insignificant but after adding confounders it becomes significant. What does that mean?
Models and output pasted below. Exposure variable date has three categories.
proc glm data=red.clean16;
class date(ref='3') ;
model Hospital_Length_of_Stay =date;
run;
The GLM Procedure
Dependent Variable: Hospital_Length_of_Stay Hospital Length of Stay
Source 
DF 
Sum of Squares 
Mean Square 
F Value 
Pr > F 
Model 
2 
139.79844 
69.89922 
1.77 
0.1702 
Error 
876 
34513.15947 
39.39858 


Corrected Total 
878 
34652.95791 



RSquare 
Coeff Var 
Root MSE 
Hospital_Length_of_Stay Mean 
0.004034 
87.43792 
6.276829 
7.178612 
Source 
DF 
Type I SS 
Mean Square 
F Value 
Pr > F 
date 
2 
139.7984412 
69.8992206 
1.77 
0.1702 
Source 
DF 
Type III SS 
Mean Square 
F Value 
Pr > F 
date 
2 
139.7984412 
69.8992206 
1.77 
0.1702 
proc glm data=red.clean16;
class date(ref='3') Gender steroiduse(ref='No') Wound_Classification _10__loss_of_body_weight_in_the_ Surgical_Wound_s__Closure ;
model Hospital_Length_of_Stay = Gender steroiduse Wound_Classification _10__loss_of_body_weight_in_the_ Surgical_Wound_s__Closure date ;
run;
The GLM Procedure
Dependent Variable: Hospital_Length_of_Stay Hospital Length of Stay
Source 
DF 
Sum of Squares 
Mean Square 
F Value 
Pr > F 
Model 
10 
1374.21056 
137.42106 
3.58 
0.0001 
Error 
868 
33278.74735 
38.33957 


Corrected Total 
878 
34652.95791 



RSquare 
Coeff Var 
Root MSE 
Hospital_Length_of_Stay Mean 
0.039656 
86.25477 
6.191896 
7.178612 
Source 
DF 
Type I SS 
Mean Square 
F Value 
Pr > F 
Gender 
1 
24.6968228 
24.6968228 
0.64 
0.4224 
steroiduse 
1 
71.2541111 
71.2541111 
1.86 
0.1732 
Wound_Classification 
3 
608.3247122 
202.7749041 
5.29 
0.0013 
_10__loss_of_body_we 
1 
398.0304391 
398.0304391 
10.38 
0.0013 
Surgical_Wound_s__Cl 
2 
42.5667622 
21.2833811 
0.56 
0.5742 
date 
2 
229.3377091 
114.6688546 
2.99 
0.0508 
Source 
DF 
Type III SS 
Mean Square 
F Value 
Pr > F 
Gender 
1 
39.5736506 
39.5736506 
1.03 
0.3099 
steroiduse 
1 
27.0957154 
27.0957154 
0.71 
0.4008 
Wound_Classification 
3 
540.7447182 
180.2482394 
4.70 
0.0029 
_10__loss_of_body_we 
1 
442.3318647 
442.3318647 
11.54 
0.0007 
Surgical_Wound_s__Cl 
2 
32.1257351 
16.0628676 
0.42 
0.6579 
date 
2 
229.3377091 
114.6688546 
2.99 
0.0508 
The Model pvalue tells you if your model explains something (i.e. reduces the error sum of squares more than by random association). It didn't with just time as a regressor, but it does when you add Wound_Classification and _10__loss_of_body_weight_in_the_ Surgical_Wound_s__Closure. So these two variables are important in explaining/predictng Hospital_Length_of_Stay.
sorry, linear regression!
@Kyra wrote:
Hi,
I am running proc GLM and when I run it without confounders it is insignificant but after adding confounders it becomes significant. What does that mean?
Models and output pasted below. Exposure variable date has three categories.
That's how regression works. It is seen by some people as a drawback when using regression that if you add in variables that are correlated with the original variable, the effect of the original variable changes from significant to not significant, or vice versa (sometimes even the sign of the regression coefficient changes). It is also seen as something that is nonintuitive.
Unfortunately, there really isn't a way around this using linear regression. Correlated predictor variables cause the model to become unstable (high variance of the coefficients). One potential solution that is much less affected by correlated predictor variables is Partial Least Squares (PROC PLS in SAS).
Hi,
Is it statistically okay if i leave the analysis till univariate level saying the association was insignificant. and not getting into multivariable linear regression?
Thanks
Hi,
For me outcome is length of stay, exposure is date( date variable is in three levels according to implementation of specifics treatment protocols in respective three time frames). All other variables are confounders.
How do i interpret in relation to date variable.
Thanks
@Kyra wrote:
Hi,
For me outcome is length of stay, exposure is date( date variable is in three levels according to implementation of specifics treatment protocols in respective three time frames). All other variables are confounders.
How do i interpret in relation to date variable.
Thanks
The combined effect of date and the other variables is statistically significant, and does predict. However, from your data, you cannot determine a unique effect (or contribution) of each of the variables.
The Model pvalue tells you if your model explains something (i.e. reduces the error sum of squares more than by random association). It didn't with just time as a regressor, but it does when you add Wound_Classification and _10__loss_of_body_weight_in_the_ Surgical_Wound_s__Closure. So these two variables are important in explaining/predictng Hospital_Length_of_Stay.
Thanks, I do understand this now.
SAS Innovate 2025 is scheduled for May 69 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to levelup your skills? Choose your own adventure.