Hello everybody,
I need your skills in statistics to solve a problem.
I'm calculating a rate incidence of infection with the proc genmod using a Poisson regression model and an offset term which is the duration of the period.
Indeed, there is a zero inflated model but as far as I know we will not obtain an upper CI.
Could you confirm me that, or could you give the answer?
Thank's in advance.
proc genmod data=test; class treatment; model RATE_INF_SEV = TREATMENT / dist = poisson link = log offset = DURATION type1; lsmestimate TREATMENT 'a' 1 0 / exp lower alpha=0.01 ; lsmestimate TREATMENT 'b' 0 1 / exp lower alpha=0.01 ; ods table LSMEstimates=LSMEstimates ; run;
Mehdi
See this note.
Note that with a log-linked model, your offset variable should generally be the log of the duration, not the duration itself.
Thank's for you answer.
The duration is already in log.
Otherwise, I'm note sure the note reply to my question. I mean could we estimate a confidence intervalle when the number of event is 0.
You can get risk estimates and confidence intervals using the RISKDIFF option in PROC FREQ. In this example with two treatments, note that one treatment (t=1) has a zero count for the event (y=1). The "Column 2 Risk Estimates" table provides confidence intervals for the risk in each treatment. If you also want an exact confidence interval for the risk difference, you can add an EXACT statement with the RISKDIFF option.
data a;
input y t c;
datalines;
1 1 0
0 1 20
1 0 10
0 0 10
;
proc freq;
table t*y / riskdiff;
weight c / zeros;
run;
The CI estimated by the proc genmod and the CI by the proc freq are not the same. In my case, i can't use the proc freq but i need to get the same option (weight c / zeros) in the proc genmod.
I am not sure i can to get it...
The GENMOD analysis of the above example would be the following. No WEIGHT statement (or ZERO option) is needed. But with this modeling approach, one of the parameters - the one for the level with zero count - is infinite. For the level without the zero count, a confidence interval is provides but is wider than the intervals from PROC FREQ. The nonmodeling approach provided by PROC FREQ avoids parameter estimation and the exact analysis provides good estimates and confidence intervals for both levels.
data b;
input t c;
tr=20;
off=log(tr);
datalines;
1 0
0 10
;
proc genmod;
class t;
model c=t/d=p offset=off;
lsmeans t / ilink cl;
run;
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.