The process begins with the creation of a 'Fitness1' dataset containing physical fitness measurements with intentionally introduced missing values. Then, PROC MI is used to generate several complete datasets through multiple imputation. A regression analysis (PROC REG) is performed on each imputed dataset. Finally, PROC MIANALYZE combines the results of these regressions to produce valid statistical estimates and tests that account for the uncertainty associated with imputation.
Data Analysis
Type : CREATION_INTERNE
The data is created directly within the script via a DATA step with a DATALINES statement. The dataset is named Fitness1.
1 Code Block
DATA STEP Data
Explanation : This block creates the 'Fitness1' table from internal data provided via 'datalines'. Missing values (represented by periods '.') are intentionally included for the RunTime and RunPulse variables.
Explanation : The MI (Multiple Imputation) procedure is used to handle missing data. It generates several 'complete' datasets by replacing missing values with plausible estimates. The result is stored in the 'outmi' table.
Copied!
proc mi data=Fitness1 seed=3237851 noprint out=outmi;
var Oxygen RunTime RunPulse;
run;
1
2
PROC MI
3
DATA=Fitness1 seed=3237851 noprint out=outmi;
4
var Oxygen RunTime RunPulse;
5
RUN;
6
3 Code Block
PROC REG Data
Explanation : A linear regression (PROC REG) is executed to model 'Oxygen' as a function of 'RunTime' and 'RunPulse'. The 'by _Imputation_' statement forces the execution of a distinct regression for each dataset imputed by PROC MI. The parameter estimates from each model are saved in the 'outreg' table.
Copied!
proc reg data=outmi outest=outreg covout noprint;
model Oxygen= RunTime RunPulse;
by _Imputation_;
run;
1
PROC REGDATA=outmi outest=outreg covout noprint;
2
model Oxygen= RunTime RunPulse;
3
BY _Imputation_;
4
RUN;
4 Code Block
PROC MIANALYZE
Explanation : The MIANALYZE procedure combines the results of regressions performed on multiple imputed datasets. It reads the estimates from 'outreg' and produces a final statistical inference (parameter estimates, standard errors, tests) that is valid by accounting for the variability due to imputation.
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.