- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 08-10-2009 10:08 AM
(5117 views)
Hi,
I'm converting a regression analysis from spss tot sas.
The spss regression uses the exclude cases pairwise option:
The exclude cases pairwise option will report statistics based on all the available valid data. If there are missing values then the n's may be different for the reported statistics.
From the SAS docs I found that SAS uses an exclude cases listwise approach:
The exclude cases listwise option (the default) will delete the entire case from the analysis if any value in either the dependent list or the factor list is missing. This option results in equal n's for the reported statistics.
According to the spss docs:
Exclude cases pairwise. Cases with complete data for the pair of variables being correlated are used to compute the correlation coefficient on which the regression analysis is based. Degrees of freedom are based on the minimum pairwise N.
How can I get exclude cases pairwise behaviour for proc reg in SAS?
Thanks,
Bart
I'm converting a regression analysis from spss tot sas.
The spss regression uses the exclude cases pairwise option:
The exclude cases pairwise option will report statistics based on all the available valid data. If there are missing values then the n's may be different for the reported statistics.
From the SAS docs I found that SAS uses an exclude cases listwise approach:
The exclude cases listwise option (the default) will delete the entire case from the analysis if any value in either the dependent list or the factor list is missing. This option results in equal n's for the reported statistics.
According to the spss docs:
Exclude cases pairwise. Cases with complete data for the pair of variables being correlated are used to compute the correlation coefficient on which the regression analysis is based. Degrees of freedom are based on the minimum pairwise N.
How can I get exclude cases pairwise behaviour for proc reg in SAS?
Thanks,
Bart
6 REPLIES 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I think you would have to write a macro that loops through all pairs of independent and dependent variables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I'm not a real statistics guy. Could you explain some more?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You write a macro that does the regression of X1 and Y1, then X2 and Y1, and so on, storing the results of each.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I'd be hesitant to do the pairwise deletion approach. There is some serious bias potential in this ad hoc procedure.
A principled approach to using all the data is to use PROC MI to impute the missing data and then do the analyses and use PROC MIANALYZE to summarize the results.
Doc Muhlbaier
Duke
A principled approach to using all the data is to use PROC MI to impute the missing data and then do the analyses and use PROC MIANALYZE to summarize the results.
Doc Muhlbaier
Duke
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Doc's points are well taken and imputation is probably the better approach. But to answer your specific question, you can fit a regression model using pairwise deletion of missing values by first computing the correlation matrix among the model variables and then using the correlation matrix as input to PROC REG rather than the original data. PROC CORR computes the correlation matrix and uses pairwise deletion by default (specify the NOMISS option to use listwise deletion). In the log, REG reminds you that the sample sizes are not equal across the variables, and it then uses the smallest as the sample size for the analysis. Here is an example:
proc corr data=MyData out=CorrMx;
var y x1 x2 x3;
run;
proc reg data=CorrMx;
model y=x1 x2 x3;
run;
proc corr data=MyData out=CorrMx;
var y x1 x2 x3;
run;
proc reg data=CorrMx;
model y=x1 x2 x3;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks all for your answers.
I will start off with StatDave's suggestion since it sounds the simplest for this moment.
I will start off with StatDave's suggestion since it sounds the simplest for this moment.