Dear all,
It may be a silly question, but I was unable to resolve it after some time searching the manuals.
Here is a quick example to illustrate my question:
Margins is correctly predicting the mean number of events per exposure level - for the mean of the offset variable, which is 99.9974 participants.
Is there a way to specify any number of participants, say, 70 or 120 instead [something like at(total_participants=100)]?
All the best,
Tiago
It may be a silly question, but I was unable to resolve it after some time searching the manuals.
Here is a quick example to illustrate my question:
Code:
*! simulate data for a Poisson model clear set obs 100 set seed 123456 gen x1 = runiform() gen xb = 1 + 0.62*x1 gen exb = exp(xb) gen events = rpoisson(exb) tab events gene total_participants = round(rnormal(100,10)) gene lntotal = ln(total) *! fit the model with an offset -aggregated data glm events x1 , family(poisson) offset(lntotal) *! predict mean events at two levels of the predictor margins, at(x1=(0.25 0.75))
Is there a way to specify any number of participants, say, 70 or 120 instead [something like at(total_participants=100)]?
All the best,
Tiago
Comment