Hello,
I am trying to estimate interaction on an additive scale between two exposure variables, A and B. Exposure A is a 5-level categorigal variable measuring quintiles of neighbourhood deprivation, and exposure B is a 3-level categorical variable measuring individual-level socioeconomic status. I have therefore created dummy variables for each level of A and B (see code below). My outcome, Y, is a binary variable measuring smoking status. I have not included additional covariates in the model for now.
I am using the new reri in Stata 18 to estimate additive interaction. I have no problem running binomial regression using binreg for all combinations of A and B, but when I add the reri option, I get the 503 conformability error for all but one combination of A and B. Is anyone familiar with reri? Any advice would be very much appreciated! Thank you very much!
I am trying to estimate interaction on an additive scale between two exposure variables, A and B. Exposure A is a 5-level categorigal variable measuring quintiles of neighbourhood deprivation, and exposure B is a 3-level categorical variable measuring individual-level socioeconomic status. I have therefore created dummy variables for each level of A and B (see code below). My outcome, Y, is a binary variable measuring smoking status. I have not included additional covariates in the model for now.
I am using the new reri in Stata 18 to estimate additive interaction. I have no problem running binomial regression using binreg for all combinations of A and B, but when I add the reri option, I get the 503 conformability error for all but one combination of A and B. Is anyone familiar with reri? Any advice would be very much appreciated! Thank you very much!
Code:
//additive interaction using reri //create dummy variables for A (5-level variable with values 1-5) generate A2=0 if A==1 replace A2=1 if A==2 generate A3=0 if A==1 replace A3=1 if A==3 generate A4=0 if A==1 replace A4=1 if A==4 generateA5=0 if A==1 replace A5=1 if A==5 //create dummy variables for B (3-level variable with values 0-2) generate B2=0 if B==0 replace B2=1 if B==1 generate B3=0 if B==0 replace B3=1 if B==2 //multiplicative interaction binreg Y A2#B2, rr binreg Y A2#B3, rr binreg Y A3#B2, rr binreg Y A3#B3, rr binreg Y A4#B2, rr binreg Y A4#B3, rr binreg Y A5#B2, rr binreg Y A5#B3, rr //additive interaction reri binreg Y A2#B2, rr //error reri binreg Y A2#B3, rr //error reri binreg Y A3#B2, rr reri binreg Y A3#B3, rr //error reri binreg Y A4#B2, rr //error reri binreg Y A4#B3, rr //error reri binreg Y A5#B2, rr //error reri binreg Y A5#B3, rr //error
Comment