- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi everybody!
I've fitted a log-binomial model with PROC GENMOD and want to output the deviance fit statistics. After specifying the AGGREGATE option, though, the model does not converge anymore. I know fitting log binomial models is still an issue and often leads to non-convergence, which was a problem as well. Therefore, I applied the revised COPY method by Deddens et al.* which worked and the model converged.
Anyway, could the weighting cause the problem? Does anybody has an idea what the reason could be? Alternatively, I think about calculating the LR test by hand with the log likelihood information from my fitted model and an intercept-only model - would that be appropriate? I guess simply running a logistic model would be inappropriate becaus in fact with a different link function it is a different model?
In principle, that's my syntax:
proc genmod data=data desc;
weight w;
class a b c d /param=ref;
model y=a b c d e f /dist=binomial link=log intercept=-4 cl (((aggregate)));
run;
I appreciate your comments and answers. As this is my first question, please let me know if you need further information!
*COPY method: save a copy of the original data set weighted with .999 and a second copy with the response reversed and weight .001. then merge the two copies into one data set and use this third data set for regression (with weight statement). (http://oem.bmj.com/content/65/7/501.long)
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I am not an expert on this topic, but I would have expected to see
AGGREGATE=(a b c d)
The doc says "Specifying the AGGREGATE option is equivalent to specifying the AGGREGATE= option with a variable list that includes all explanatory variables in the MODEL statement." Currently you are also aggregating over the continuous variables e and f
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rick,
thanks so much for your reply! You're right, aggregation was for all, i.e. character and numeric covariates in the model. I read before that for defining unique profiles for all observations all variables have to be included. That's why I thought the doubling and weighting of the original dataset could be the problem.
Nevertheless, I re-ran the model without the continuous covariates and indeed, the model converged, but the requested statistic is still not in the output. Here's what the log says:
NOTE: The Pearson Chi-Square and deviance cannot be computed since there is more than one profile of the explanatory variables within the same profile of the aggregate variables. The SCALE= option is ignored.
NOTE: PROC GENMOD is modeling the probability that y='1'.
NOTE: The Pearson chi-square and deviance are not computed since the AGGREGATE option is not
specified.
NOTE: Algorithm converged.
NOTE: The scale parameter was held fixed.
I didn't specify the SCALE option. As I got this note before, though, I already tried to define a scale parameter (deviance and Pearson) but that didn't help either.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Your NOTEs do not match the syntax that you supplied. Post the code or log that generates the notes.
Here is working code that you can study/modify. If a model doesn't converge, it is usually a sign that the model does not match the data. If you can duplicate your problem by using the Sashelp.Heart data, please do so.
proc genmod data=sashelp.heart;
class BP_Status Chol_Status Smoking_Status Weight_Status/param=ref;
model Status(ref='Dead')= BP_Status Chol_Status Smoking_Status Weight_Status
/dist=binomial link=log cl aggregate;
ods exclude ObStats;
ods output ObStats=ObStats;
run;
proc print data=ObStats(obs=10);
run;