The script begins by creating a 'Fitness1' dataset from internal data (datalines), which simulates fitness measurements with intentional missing values. Then, the MI procedure is used for the first time to generate multiple imputations via an MCMC method and stores the result in the 'outex10' table. A second execution of PROC MI is performed on the imputed dataset with the nimpute=0 option, which is typically done to analyze the imputation results without generating new ones.
Data Analysis
Type : INTERNAL_CREATION
The data is created directly in the script via a DATA step with a DATALINES statement. The 'Fitness1' dataset contains fitness measurements (Oxygen, RunTime, RunPulse) for several individuals.
1 Code Block
DATA STEP Data
Explanation : This DATA STEP block creates the 'Fitness1' table. The 'input' statement reads three numeric variables (Oxygen, RunTime, RunPulse). The ' @@' (double trailing at) specifier keeps the pointer on the input data line, allowing multiple observations to be read from a single line. The data is provided directly in the code via the 'datalines' statement.
Explanation : This Multiple Imputation (MI) procedure processes the 'Fitness1' dataset. It uses an MCMC (Markov Chain Monte Carlo) method with monotone imputation to generate values for missing data in the specified variables. The 'seed' option ensures the reproducibility of the imputation. The results, including the multiple imputed datasets, are stored in the 'outex10' output table.
Copied!
proc mi data=Fitness1 seed=17655417 out=outex10;
mcmc impute=monotone;
var Oxygen RunTime RunPulse;
run;
1
PROC MIDATA=Fitness1 seed=17655417 out=outex10;
2
mcmc impute=monotone;
3
var Oxygen RunTime RunPulse;
4
RUN;
3 Code Block
PROC MI
Explanation : The MI procedure is called again, this time on the 'outex10' table which contains the imputed data. The 'nimpute=0' option indicates that no new imputation should be performed. This type of call is generally used to obtain descriptive statistics or analyses on all imputed data, by combining the results of different imputations.
Copied!
proc mi data=outex10 seed=15541 nimpute=0;
var Oxygen RunTime RunPulse;
run;
1
2
PROC MI
3
DATA=outex10 seed=15541 nimpute=0;
4
var Oxygen RunTime RunPulse;
5
RUN;
6
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.