BookmarkSubscribeRSS Feed
rebeccachau
Obsidian | Level 7

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

 

107
108 proc mi data=wideout nimpute=20 out=mi_fcstest seed=54321;
109 class CURMDESAS1 CURMDESAS2 FAC1 FAC2 RECDEP1 RECDEP2;
110 fcs plots=trace;
111 var FAC1 FAC2 NHP51 SD11 SD21 SD31 SD41 SD51 SD61 SD71 SD81 SOCTOTSAS1 ME11 ME21 ME31 PMS11 PMS21 PMS31 PMS41 PMS51 PMS71
111 ! GDS11 GDS21 GDS31 GDS41 GDS51 GDS61 GDS71 GDS81 GDS101 GDS111 GDS121 GDS131 GDS141 GDS151 NHP31 NHP52 SD22 SD32 SD42
111 ! SD52 SD62 SD72 SD82 PMS61 PMS12 PMS52 PMS62 PMS72 GDS91 GDS12 GDS22 GDS32 GDS42 GDS52 GDS62 GDS72 GDS82 GDS102 GDS112
111 ! GDS132 GDS142 GDS152 ADL12 ADL22 ADL32 ADL42 ADL52 ADL62 ADL72 ADL92 CURMDESAS1 WAVETIMESAS2 NHP21 SD12 ME32 PMS22 PMS42
111 ! GDS92 ADL82 ADL102 CURMDESAS2 ME12 ME22 PMS32 GDS122 NHP22 NHP32 RECDEP2 SOCTOTSAS2 ADL11 ADL31 ADL41 ADL51 ADL61 ADL71
111 ! ADL81 ADL91 ADL101 RECDEP1 ADL21 COGTOTSAS1 NHP11 NHP12 NHP41 NHP42 COGTOTSAS2 PEFITTOTSAS2 PEFITTOTSAS1 ;
112 fcs logistic (CURMDESAS1/details) logistic (CURMDESAS2/details) logistic (RECDEP1/details) logistic (RECDEP2/details)
112 ! regpmm (NHP21 SD12 ME32 PMS22 PMS42 GDS92 ADL82 ADL102 ME12 ME22 PMS32 GDS122 NHP22 NHP32 SOCTOTSAS2 ADL11 ADL31 ADL41
112 ! ADL51 ADL61 ADL71 ADL81 ADL91 ADL101 ADL21 COGTOTSAS1 NHP11 NHP12 NHP41 NHP42 COGTOTSAS2 PEFITTOTSAS2 PEFITTOTSAS1);
113 run;
 
WARNING: An effect for variable NHP31 is a linear combination of other effects. The coefficient of the effect will be set to zero
in the imputation.
WARNING: An effect for variable NHP52 is a linear combination of other effects. The coefficient of the effect will be set to zero
in the imputation.
WARNING: An effect for variable SD22 is a linear combination of other effects. The coefficient of the effect will be set to zero in
the imputation.
WARNING: An effect for variable SD32 is a linear combination of other effects. The coefficient of the effect will be set to zero in
the imputation.
WARNING: An effect for variable SD42 is a linear combination of other effects. The coefficient of the effect will be set to zero in
the imputation.
WARNING: An effect for variable SD52 is a linear combination of other effects. The coefficient of the effect will be set to zero in
the imputation.
WARNING: An effect for variable SD62 is a linear combination of other effects. The coefficient of the effect will be set to zero in
the imputation.
WARNING: An effect for variable SD72 is a linear combination of other effects. The coefficient of the effect will be set to zero in
the imputation.
WARNING: An effect for variable SD82 is a linear combination of other effects. The coefficient of the effect will be set to zero in
the imputation.
WARNING: An effect for variable PMS61 is a linear combination of other effects. The coefficient of the effect will be set to zero
in the imputation.
WARNING: An effect for variable PMS12 is a linear combination of other effects. The coefficient of the effect will be set to zero
in the imputation.
WARNING: An effect for variable PMS52 is a linear combination of other effects. The coefficient of the effect will be set to zero
in the imputation.
WARNING: An effect for variable PMS62 is a linear combination of other effects. The coefficient of the effect will be set to zero
in the imputation.
WARNING: An effect for variable PMS72 is a linear combination of other effects. The coefficient of the effect will be set to zero
in the imputation.
WARNING: An effect for variable GDS91 is a linear combination of other effects. The coefficient of the effect will be set to zero
in the imputation.
WARNING: An effect for variable GDS12 is a linear combination of other effects. The coefficient of the effect will be set to zero
in the imputation.
WARNING: An effect for variable GDS22 is a linear combination of other effects. The coefficient of the effect will be set to zero
in the imputation.
WARNING: An effect for variable GDS32 is a linear combination of other effects. The coefficient of the effect will be set to zero
in the imputation.
ERROR: Not enough observations to fit regression models for variable GDS42 with an FCS regression method.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.MI_FCSTEST may be incomplete. When this step was stopped there were 0 observations and 113 variables.
WARNING: Data set WORK.MI_FCSTEST was not replaced because this step was stopped.
NOTE: PROCEDURE MI used (Total process time):
real time 6.78 seconds
cpu time 6.77 seconds
 
114
115
116
117 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
130
 

 

2 REPLIES 2
wrrichar1
SAS Employee

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

rebeccachau
Obsidian | Level 7

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.

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1664 views
  • 0 likes
  • 2 in conversation