Thank you so much for this helpful response, @StatDave! First, the distribution explanation (maximum likelihood algorithm vs least-squares) clarifies the error message, I will try to troubleshoot by just using a GENMOD syntax! Could I potentially think that the convergence problem could be the reason why my output produces marginal effects that are almost all 0s? Secondly, I read through the helpful documentation you sent me and as I was making sure that I understood the approach perfectly, I had 2 quick questions. Below, I've written out the syntax from the website and the syntax you wrote for me: *FROM THE WEBSITE:
%Margins(data=Remiss,
response=remiss,
roptions=event='1',
model=blast smear,
dist= binomial,
effect=blast,
at= blast smear,
atwhere=blast=1.1 and smear=.83,
options=cl)
*FROM DAVE:
proc means data=JH.Final3;
var cPAreactpost;
output out=out mean=mean std=sd;
run;
data adat;
set out;
keep cPAreactpost ClinicSex;
do cPAreactpost = mean-sd, mean, mean+sd;
ClinicSex=1; output;
ClinicSex=2; output;
end;
run;
%Margins(data=JH.Final3, response=SystolicSittingMeanLastTwo, class=ClinicSex,
model=SystolicSittingMeanLastTwo cage marriedmidus work race_orig cedu cHHtotalIncome_total EverSmokeReg Exercise20mins CVDmeds cBMI cCESD
cNeuroticism cpa_mlm2 cTotalChronBio AnyStressWide_sum7|cPAreactpost|ClinicSex,
effect=AnyStressWide_sum7, at=PAreactpot ClinicSex, atdata=adat,
options=cl) 1) In our syntax, do we not have the “ roptions=event='1' ',” and “ dist= binomial ” syntax because our DV is a continuous variable and does not have a binomial distribution? 2) Also, the way the website wrote out the model statement is a bit different than ours. The website only wrote out the predictors (e.g., “ model=blast smear ”), whereas we included the DV (e.g., model=SystolicSittingMeanLastTwo cage marriedmidus work race_orig cedu cHHtotalIncome_total EverSmokeReg Exercise20mins CVDmeds cBMI cCESD cNeuroticism cpa_mlm2 cTotalChronBio AnyStressWide_sum7|cPAreactpost|ClinicSex ”). Would it be safe for me to assume that both approaches are correct? 3) The website uses specific values of each predictor variable ( atwhere=blast=1.1 and smear=.83 ) to run the macro statement but you helped me create another dataset that contains more than one specified value of the two predictor variables ( data adat; set out; keep cPAreactpost ClinicSex; do cPAreactpost = mean-sd, mean, mean+sd; ClinicSex=1; output;ClinicSex=2; output; end;). Would it be correct for me to think that your approach is better because it allows me to use more than 1 specified value at which we are estimating the marginal effects? Thank you so much in advance for your additional help, I am learning so much and so grateful for this opportunity!
... View more