Dear all,
I am attempting to obtain the combined parameters from 25 logistic regressions using imputed datasets.
At this stage, I am not concerned about the imputation method.
Initially, I followed an example from the SAS manual, which worked fine.
However, when applying the same approach to my dataset, I successfully obtained the parameter estimates and standard errors, but the other statistics appear as missing values.
Could you please help me identify what might be wrong with my code?
Thank you in advance.
Best regards,
CODES:
PROC LOGISTIC descending DATA=TOT1;
CLASS PAIS (REF='BR')/ param=glm;;
MODEL IVA=PAIS;
BY _IMPUTATION_;
ODS OUTPUT PARAMETERESTIMATES=lgsparms;
RUN;
PROC MIANALYZE PARMS(classvar=classval)=lgparms;
class pais;
MODELEFFECTS intercept pais;
RESULTS:
WORK.LGPARMS |
25 |
0 | 0.023737 | 0.023737 | . | 0 | . | . |
0 | 0.049479 | 0.049479 | . | 0 | . | . |
0 | 0.049514 | 0.049514 | . | 0 | . | . |
5.382674 | 0.154068 | . | . | . | 5.382674 | 5.382674 | 0 | . | . |
0.150375 | 0.222438 | . | . | . | 0.150375 | 0.150375 | 0 | . | . |
-0.210373 | 0.222518 | . | . | . | -0.210373 | -0.210373 | 0 | . |
RUN;
When you have a CLASS variable, one of the levels will always have a zero or missing for its estimate.
Dear Paige,
yes.
When I posted the results the platform changed the tables.
The variable pais has three categories and one is the reference. So, I have the results for two categories.
However in the results, I have only the parameter estimates and their respective standard errors. The p-value is missing and all the other statistics are missing.
Best regards
When SAS forces an estimate to be zero, there is no standard error or confidence interval.
Perhaps you want to use the TEST statement in PROC MIANALYZE to obtain the value of the linear combinations of the model effects.
Dear Page,
I believe I figured out what is happening.
I will post here the results for a variable that has no missing value (DST):
Parameter Estimates (25 Imputations) | ||||||||||
Parameter | Estimate | Std Error | 95% Confidence Limits | DF | Minimum | Maximum | Theta0 | t for H0: | Pr > |t| | |
intercept | -5.780452 | 0.219929 | -6.21156 | -5.34935 | 10234 | -5.868025 | -5.683721 | 0 | -26.28 | <.0001 |
dst | 1.030766 | 0.322012 | 0.39934 | 1.66219 | 2637.5 | 0.823595 | 1.204587 | 0 | 3.20 | 0.0014 |
As you can see, we have the estimate and its respective standard error, its 95% confidence limits, and the p-values. For the variable pais (country) we had only the values for the parameters and their respective confidence interval. But the country is a variable without any missing.
Thanks a lot.
Regards
For a class variable like Country, one of the levels will always have a zero estimate, and missing for standard error and for confidence interval. There is nothing wrong with this, that's how SAS operates.
Please read this description of why SAS does this: https://communities.sas.com/t5/Statistical-Procedures/Interpreting-Multivariate-Linear-Regression-wi...
@Ksharp wrote:
I think you don't need CLASS statement in PROC MIANALYZE ,
Just list the value of PAIS in MODELEFFECTS ,or using colon operator to represent them all.
PROC MIANALYZE PARMS=lgparms;
MODELEFFECTS intercept pais: ;
or
MODELEFFECTS intercept pais_a pais_b ..........;
You can change the parameterization of the model so that the coefficient which SAS forces to be zero is no longer zero. But you haven't gained anything, because its still the exact same model. There are an infinite number of ways to parameterize the model and each produces different coefficients, but they are all the same model.
I believe that if you check the LOG you will see an explanation for the missing results in the form of a WARNING about the between imputation variance being zero.
The message you are receiving can have a number of possible causes. The first is that there is some problem with the imputation model itself (I have seen where people have left the response variable off the VAR statement in Proc MI as an example). In general though it occurs when the missing data has no influence on the sampling error of a parameter estimate. There is no fix or adjustment for that, but it does require some further investigation on your part. Usually it is an indication of a problem with the imputation model with possible causes ranging from a poor imputation model to no real need to impute due to a very small fraction of missing information
Without fixing the problem, when the between imputation variance is zero then the number of Degrees of Freedom is undefined so you cannot get a confidence interval or p-values. If you are unable to determine the cause then one suggestion would be that, if there are only minimum differences among these within-imputation variances, then look at the results for that variable for one of the imputations.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.