'Multiple imputation with modified Poisson regression (GENMOD)

I am attempting to conduct multiple imputation prior to my modified poisson regression analysis. everything seems to work until the proc mianalyze step. At the proc mianalyze step, I receive an error that the first variable listed (in this case, ethnorac1) is not in the dataset. I have only successfully conducted multiple imputation with linear regression in the past, so I'm not sure which commands or details I'm missing. Code is below. Please help!

/*Step 1: Imputation Phase*/
proc mi data=tpc2019irn seed=573382369 nimpute=20 out=irnfcs ;
title3 'Imputing Phase irn ppct';
  class ethnorac a13status d3_reasons a14 pp_immigrant provreg a8_7cat 
  b5gp b2 poverty_2cat e1_3cat f1_2cat i2recode d8lgbtcom ;
var  a1 ethnorac a13status d3_reasons a14 pp_immigrant provreg a8_7cat
  b5gp b2 poverty_2cat e1_3cat f1_2cat i2recode tpcweights Indi_a d1_length
d8lgbtcom; 
fcs logistic (provreg = Indi_a d3_reasons /details);
fcs logistic (a8_7cat = Indi_a poverty_2cat d3_reasons ethnorac/ details );
fcs logistic (b5gp = b2 i2recode Indi_a poverty_2cat / details );
fcs discrim (b2 = b5gp Indi_a /classeffects=include);
fcs discrim (poverty_2cat = a1 a13status b5gp b2 Indi_a /classeffects=include);
fcs logistic (e1_3cat = a1 a14 ethnorac a13status d3_reasons a8_7cat f1_2cat/details);
fcs discrim (i2recode = a1 b2 b5gp ethnorac d3_reasons a8_7cat f1_2cat/classeffects=include);
fcs regression (indi_a = a1 b2 b5gp ethnorac a8_7cat poverty_2cat provreg d1_length);
fcs regression (d1_length = a1 a8_7cat poverty_2cat a13status a14);
fcs logistic (d8lgbtcom = a1 a14 b5gp b2 ethnorac a13status d3_reasons /details);

Proc GenMod data=irnfcs ;
title3 'MI. Mod Pois Regress. Healthcare provider w/o moderators';
Class id f1_2cat (ref='0') ethnorac (ref='0') b5gp (ref='1') b2 (ref='1') provreg (ref='1') 
a13status (ref='0') d3_reasons (ref='0') a8_7cat (ref='2') d8lgbtcom (ref='1')
poverty_2cat (ref='0') e1_3cat (ref='1') /param=ref ref=first;
Model f1_2cat = a1 ethnorac e1_3cat b5gp b2 provreg d1_length a13status d3_reasons a8_7cat 
d1_length d8lgbtcom poverty_2cat / Dist=poisson Link=log;
weight tpcweights;
by _imputation_ ;
Repeated subject=id  / printmle type=Ind;
ods output parameterestimates = regparms;

run;
proc print data=regparms;
run;

proc sort data=regparms;
by _imputation_;
run;

data regparms2;
set regparms;
parameter=compress(parameter);

proc print data=regparms2;
by _imputation_;
run;

proc mianalyze parms=regparms2 ;
modeleffects 
 intercept a1 ethnorac1 e1_3cat2 e1_3cat3 b5gp2 b5gp3 b22 provreg2 provreg3 provreg4 
d1_length  a13status1 a13status2 d3_reasons1 poverty_2cat1 a8_7cat3 a8_7cat4 
a8_7cat5 a8_7cat6 a8_7cat7 d8lgbtcom2;
run;


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source