Hi there, I am attempting to run MI, FCS. I have run MVN (MCMC) with the same data set, omitting the categorical (outcome) variables, and this seems to work fine. However, when I attempt to include the categorical variables using FCS, the MI isn't executed due to errors. Therefore I am wondering if there is a problem with my code. I am imputing a lot of variables (because I'm going item by item rather than summed scale). The missingness pattern is arbitrary. N=81, so it's a small data set, but most items are only missing about 6% or less data. I have included in the FCS statement only the variables with missing data, and the variables are ordered from least to most missing.
Below is my code (MI code in bold), followed by the long set of errors. I have also attached the data set. Any ideas on what is going on here?
/* Source Path: /folders/myfolders */
/* Code generated on: 15/11/2018 13:24 */
%web_drop_table(WORK.IMPORT3);
FILENAME REFFILE '/folders/myfolders/Data-15-11-18-NO-DROPOUTS.xlsx';
PROC IMPORT DATAFILE=REFFILE
DBMS=XLSX
OUT=WORK.IMPORT3;
GETNAMES=YES;
RUN;
PROC CONTENTS DATA=WORK.IMPORT3; RUN;
%web_open_table(WORK.IMPORT3);
proc import out=wideIn datafile='/folders/myfolders/Data-15-11-18-NO-DROPOUTS.xlsx' dbms=xlsx replace;run;
proc sort data=wideIn; by ID Time;
run;
proc transpose data=wideIn out=long;
by ID Time;
var ADL1-ADL10 COGTOTSAS CURMDESAS FAC GDS1-GDS15 ME1-ME3 NHP1-NHP5 PEFITTOTSAS PMS1-PMS7 RECDEP SD1-SD8 SOCTOTSAS WAVETIMESAS;
run;
proc transpose data=long out=wideout;
by ID;
id _name_ Time;
var col1;
run;
proc mi data=wideout nimpute=20 out=mi_fcstest seed=54321;
class CURMDESAS1 CURMDESAS2 FAC1 FAC2 RECDEP1 RECDEP2;
fcs plots=trace;
var FAC1 FAC2 NHP51 SD11 SD21 SD31 SD41 SD51 SD61 SD71 SD81 SOCTOTSAS1 ME11 ME21 ME31 PMS11 PMS21 PMS31 PMS41 PMS51 PMS71 GDS11 GDS21 GDS31 GDS41 GDS51 GDS61 GDS71 GDS81 GDS101 GDS111 GDS121 GDS131 GDS141 GDS151 NHP31 NHP52 SD22 SD32 SD42 SD52 SD62 SD72 SD82 PMS61 PMS12 PMS52 PMS62 PMS72 GDS91 GDS12 GDS22 GDS32 GDS42 GDS52 GDS62 GDS72 GDS82 GDS102 GDS112 GDS132 GDS142 GDS152 ADL12 ADL22 ADL32 ADL42 ADL52 ADL62 ADL72 ADL92 CURMDESAS1 WAVETIMESAS2 NHP21 SD12 ME32 PMS22 PMS42 GDS92 ADL82 ADL102 CURMDESAS2 ME12 ME22 PMS32 GDS122 NHP22 NHP32 RECDEP2 SOCTOTSAS2 ADL11 ADL31 ADL41 ADL51 ADL61 ADL71 ADL81 ADL91 ADL101 RECDEP1 ADL21 COGTOTSAS1 NHP11 NHP12 NHP41 NHP42 COGTOTSAS2 PEFITTOTSAS2 PEFITTOTSAS1 ;
fcs logistic (CURMDESAS1/details) logistic (CURMDESAS2/details) logistic (RECDEP1/details) logistic (RECDEP2/details) regpmm (NHP21 SD12 ME32 PMS22 PMS42 GDS92 ADL82 ADL102 ME12 ME22 PMS32 GDS122 NHP22 NHP32 SOCTOTSAS2 ADL11 ADL31 ADL41 ADL51 ADL61 ADL71 ADL81 ADL91 ADL101 ADL21 COGTOTSAS1 NHP11 NHP12 NHP41 NHP42 COGTOTSAS2 PEFITTOTSAS2 PEFITTOTSAS1);
run;
ERROR LOG
Hello Rebecca,
It appears that you are running a Proc import to read data in from Excel, then running a Proc Transpose and finally using Proc Mi.
Do you believe the problem you are encountering is due to the import creating variables of an incorrect type, an issue with the Proc Transpose or is the problem originating with Mi procedure?
Based on the error, I would guess it's the second or third step causing the issue.
Thanks,
Ross
Hi, the import and transpose works fine. I believe the problem is with the MI (FCS) procedure. I have conducted MI (MCMC) using the same import and transpose technique and this seems to work fine.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.