BookmarkSubscribeRSS Feed
PhanS
Obsidian | Level 7

Hello,

I appreciate your assistance. Thanks you in advance!

I need help writing an estimated statement of 4-level variable _cause. Please see SAS codes/analyses below and the attached SAS outcome. 

 

title1 'zero-inflated Poisson regression analysis - _sex';
proc genmod data = COVID.kh_analyse;
class _cause /param=glm;
model days_adm_death = _cause age_60 _eth / type3 dist=zip;
zeromodel _sex /link = logit;
estimate "_cause = 0" intercept 1 age_60 .46 _cause 0 1 @Zero intercept 1 _sex .45;
estimate "_cause = 1" intercept 1 age_60 .46 _cause 1 0 @Zero intercept 1 _sex .45;
estimate "_cause = 0" intercept 1 age_60 .46 _cause 1 0 @Zero intercept 1 _sex .45;
estimate "_cause = 2" intercept 1 age_60 .46 _cause 1 0 @Zero intercept 1 _sex .45;
estimate "_cause = 0" intercept 1 age_60 .46 _cause 0 1 @Zero intercept 3 _sex .45;
estimate "_cause = 3" intercept 1 age_60 .46 _cause 1 0 @Zero intercept 1 _sex .45;
estimate "_cause = 0" intercept 1 age_60 .46 _cause 0 1 @Zero intercept 4 _sex .45;
estimate "_cause = 4" intercept 1 age_60 .46 _cause 1 0 @Zero intercept 4 _sex .45;
run;

proc means data = COVID.kh_analyse mean std min max var;
var days_adm_death age_60 _sex;
run;

proc freq data = COVID.kh_analyse;
tables _cause;
run;

 

1 REPLY 1
StatDave
SAS Super FREQ

As discussed in this note, you cannot use the ESTIMATE statement to obtain estimated means from zero-inflated models fit by PROC GENMOD. See the methods shown in the note to estimate means under the model. 

 

You can search the SAS Notes and Samples at https://support.sas.com/en/knowledge-base.html and the list of Frequently-Asked for Statistics at https://support.sas.com/kb/30/333.html .

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

What is ANOVA?

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.

Discussion stats
  • 1 reply
  • 780 views
  • 0 likes
  • 2 in conversation