Hi,

I am looking for a reference or a hint as to where I could find more

information regarding ZIP models using SAS. I am interested in using them

in a repeated measures type setting. I found a SAS-L posting

(http://listserv.uga.edu/cgi-bin/wa?A2=ind0205B&L=sas-l&P=R12947) that got

me headed in the right direction but I'm still searching for a way to deal

with repeated measures designs.

Anyone have a suggestion?

David Neal

I am looking for a reference or a hint as to where I could find more

information regarding ZIP models using SAS. I am interested in using them

in a repeated measures type setting. I found a SAS-L posting

(http://listserv.uga.edu/cgi-bin/wa?A2=ind0205B&L=sas-l&P=R12947) that got

me headed in the right direction but I'm still searching for a way to deal

with repeated measures designs.

Anyone have a suggestion?

David Neal

David,

You need to tell us a little more about your design. Are the

repeats observed at common times across subjects? How many

repeated measures per subject do you have? Correlations induced

by the repeated measures may be handled through appropriate

specification of RANDOM effects. It is that appropriate

specification part which can sometimes be tricky to specify.

That is why more detail is required.

Dale

=====

---------------------------------------

Dale McLerran

Fred Hutchinson Cancer Research Center

mailto: XXXX@XXXXX.COM

Ph: (206) 667-2926

Fax: (206) 667-5977

---------------------------------------

__________________________________

Do you Yahoo!?

Yahoo! Mail SpamGuard - Read only the mail you want.

http://antispam.yahoo.com/tools

Dale,

The design involves three treatment groups that were measured pre, post,

follow-up 1(3month), follow-up 2(6 month), follow-up 3(12 month). There

were literally hundreds of variables collected on each subject for each time

period.(I guess they were going for the shotgun effect) Several of the

variables involve counts that have high frequencies of zeros. We are trying

to narrow the focus a bit before we start any sort of an analysis so I

expect to be dealing with a smaller subset of variables. I'm coming into

the project on the back end so I'm not quite up to speed on all the oddities

of the data but my initial impression is that a ZIP model would be an

appropriate choice.

David

-----Original Message-----

From: SAS(r) Discussion [mailto: XXXX@XXXXX.COM ] On Behalf Of Dale

McLerran

Sent: Wednesday, February 18, 2004 7:57 AM

To: XXXX@XXXXX.COM

Subject: Re: Zero Inflated Poisson Models in SAS (repeated measures)

David,

You need to tell us a little more about your design. Are the

repeats observed at common times across subjects? How many

repeated measures per subject do you have? Correlations induced

by the repeated measures may be handled through appropriate

specification of RANDOM effects. It is that appropriate

specification part which can sometimes be tricky to specify.

That is why more detail is required.

Dale

=====

---------------------------------------

Dale McLerran

Fred Hutchinson Cancer Research Center

mailto: XXXX@XXXXX.COM

Ph: (206) 667-2926

Fax: (206) 667-5977

---------------------------------------

__________________________________

Do you Yahoo!?

Yahoo! Mail SpamGuard - Read only the mail you want.

http://antispam.yahoo.com/tools

The design involves three treatment groups that were measured pre, post,

follow-up 1(3month), follow-up 2(6 month), follow-up 3(12 month). There

were literally hundreds of variables collected on each subject for each time

period.(I guess they were going for the shotgun effect) Several of the

variables involve counts that have high frequencies of zeros. We are trying

to narrow the focus a bit before we start any sort of an analysis so I

expect to be dealing with a smaller subset of variables. I'm coming into

the project on the back end so I'm not quite up to speed on all the oddities

of the data but my initial impression is that a ZIP model would be an

appropriate choice.

David

-----Original Message-----

From: SAS(r) Discussion [mailto: XXXX@XXXXX.COM ] On Behalf Of Dale

McLerran

Sent: Wednesday, February 18, 2004 7:57 AM

To: XXXX@XXXXX.COM

Subject: Re: Zero Inflated Poisson Models in SAS (repeated measures)

David,

You need to tell us a little more about your design. Are the

repeats observed at common times across subjects? How many

repeated measures per subject do you have? Correlations induced

by the repeated measures may be handled through appropriate

specification of RANDOM effects. It is that appropriate

specification part which can sometimes be tricky to specify.

That is why more detail is required.

Dale

=====

---------------------------------------

Dale McLerran

Fred Hutchinson Cancer Research Center

mailto: XXXX@XXXXX.COM

Ph: (206) 667-2926

Fax: (206) 667-5977

---------------------------------------

__________________________________

Do you Yahoo!?

Yahoo! Mail SpamGuard - Read only the mail you want.

http://antispam.yahoo.com/tools

It might well be, but if the non-zero observations tend mostly to be

small frequencies (1s & 2s) it might be methodologically simpler to

dichotomize the outcomes as 0 vs >0, and going with a generalized

mixed linear model or a generalized estimating equations model. Do you

have a lot of missing data?

How you're going to deal with hundreds of outcomes is a different

problem!

JW

avid,

I am glad to see that repeated measures were obtained at fixed

time points. Since the observations are not equally spaced and

include observations in different phases of the experimental

design (pre-treatment, post-treatment, and follow-up measures),

I would think that either of two different models would be

appropriate:

1) Each participant has a subject-specific stochastic element

affecting the probability of having a zero value as well as a

stochastic element affecting the expectation of the Poisson

component. That is, the subject-specific responses are time

invariant. The subject-specific effects on the zero-inflation

probability model may or may not be correlated with the subject-

specific effect that operates on the Poisson expectation.

2) There are different subject-specific effects for each of the

five measurement periods, but there is some positive covariance

structure to the five subject-specific effects. Again, one

might want to consider a model in which the zero-inflation

random effects are independent of the expectation random effects

as well as a model in which the zero-inflation random effects

are correlated with the random effects operating on the

Poisson expectation.

Before going into the code for modeling the random effects which

would be appropriate for this repeated measures design, let me

first point you to a more complete discussion of ZIP models than

the posting which you found in the archives. The more complete

posting is also in the archives at

http://listserv.uga.edu/cgi-bin/wa?A2=ind0208A&L=sas-l&P=R16978&D=0

Now, when you look at that posting, you see that we have two

eta's, one which models the zero-inflation probability and one

which models the Poisson expectation. You probably should add

random effects to each of these linear terms. Time invariant

random effects would be modeled as

proc nlmixed data=mydata;

eta_prob = b0_prob + b1_prob*x1 + b2_prob*x2;

eta_prob = eta_prob + g0_prob;

p_0 = exp(eta_prob)/(1 + exp(eta_prob));

eta_lambda = b0_lambda + b1_lambda*x1 + b2_lambda*x2;

eta_lambda = eta_lambda + g0_lambda;

lambda = exp(eta_lambda);

/* likelihood structure for ZIP. Note that we cannot generate */

/* the log likelihood for the zero response values directly. We */

/* must generate the likelihood and then take the logarithm due */

/* to the additive nature of the zero likelihood. */

if y=0 then loglike = log(p_0 + (1-p_0)*exp(-lambda));

else loglike = log(1-p_0) + y*log(lambda) -lambda - lgamma(y+1);

model y ~ general(loglike);

random g0_prob g0_lambda ~

normal([0,0],

[exp(2*log_Vprob),

rho*exp(log_Vprob)*exp(log_Vlambda),

exp(2*log_Vlambda)]) subject=subject;

Here I have modeled a nonzero covariance between the zero-

inflation random effect and the Poisson expectation random effect.

If you think that these two terms should be uncorrelated, then

you would just change the random statement to

random g0_prob g0_lambda ~

normal([0,0],

[exp(2*log_Vprob),

0,

exp(2*log_Vlambda)]) subject=subject;

Now, if you believe that the subject-specific stochastic elements

vary over time, then you would need to add time-specific random

effects to the fixed effect portion of your model and model the

covariance structure for 10 random effects as follows:

I am glad to see that repeated measures were obtained at fixed

time points. Since the observations are not equally spaced and

include observations in different phases of the experimental

design (pre-treatment, post-treatment, and follow-up measures),

I would think that either of two different models would be

appropriate:

1) Each participant has a subject-specific stochastic element

affecting the probability of having a zero value as well as a

stochastic element affecting the expectation of the Poisson

component. That is, the subject-specific responses are time

invariant. The subject-specific effects on the zero-inflation

probability model may or may not be correlated with the subject-

specific effect that operates on the Poisson expectation.

2) There are different subject-specific effects for each of the

five measurement periods, but there is some positive covariance

structure to the five subject-specific effects. Again, one

might want to consider a model in which the zero-inflation

random effects are independent of the expectation random effects

as well as a model in which the zero-inflation random effects

are correlated with the random effects operating on the

Poisson expectation.

Before going into the code for modeling the random effects which

would be appropriate for this repeated measures design, let me

first point you to a more complete discussion of ZIP models than

the posting which you found in the archives. The more complete

posting is also in the archives at

http://listserv.uga.edu/cgi-bin/wa?A2=ind0208A&L=sas-l&P=R16978&D=0

Now, when you look at that posting, you see that we have two

eta's, one which models the zero-inflation probability and one

which models the Poisson expectation. You probably should add

random effects to each of these linear terms. Time invariant

random effects would be modeled as

proc nlmixed data=mydata;

eta_prob = b0_prob + b1_prob*x1 + b2_prob*x2;

eta_prob = eta_prob + g0_prob;

p_0 = exp(eta_prob)/(1 + exp(eta_prob));

eta_lambda = b0_lambda + b1_lambda*x1 + b2_lambda*x2;

eta_lambda = eta_lambda + g0_lambda;

lambda = exp(eta_lambda);

/* likelihood structure for ZIP. Note that we cannot generate */

/* the log likelihood for the zero response values directly. We */

/* must generate the likelihood and then take the logarithm due */

/* to the additive nature of the zero likelihood. */

if y=0 then loglike = log(p_0 + (1-p_0)*exp(-lambda));

else loglike = log(1-p_0) + y*log(lambda) -lambda - lgamma(y+1);

model y ~ general(loglike);

random g0_prob g0_lambda ~

normal([0,0],

[exp(2*log_Vprob),

rho*exp(log_Vprob)*exp(log_Vlambda),

exp(2*log_Vlambda)]) subject=subject;

Here I have modeled a nonzero covariance between the zero-

inflation random effect and the Poisson expectation random effect.

If you think that these two terms should be uncorrelated, then

you would just change the random statement to

random g0_prob g0_lambda ~

normal([0,0],

[exp(2*log_Vprob),

0,

exp(2*log_Vlambda)]) subject=subject;

Now, if you believe that the subject-specific stochastic elements

vary over time, then you would need to add time-specific random

effects to the fixed effect portion of your model and model the

covariance structure for 10 random effects as follows:

hank you Dale, this should get me going in the right direction. I

appreciate your time.

Thanks again

David

-----Original Message-----

From: Dale McLerran [mailto: XXXX@XXXXX.COM ]

Sent: Wednesday, February 18, 2004 1:24 PM

To: David Neal; XXXX@XXXXX.COM

Subject: Re: Zero Inflated Poisson Models in SAS (repeated measures)

David,

I am glad to see that repeated measures were obtained at fixed

time points. Since the observations are not equally spaced and

include observations in different phases of the experimental

design (pre-treatment, post-treatment, and follow-up measures),

I would think that either of two different models would be

appropriate:

1) Each participant has a subject-specific stochastic element

affecting the probability of having a zero value as well as a

stochastic element affecting the expectation of the Poisson

component. That is, the subject-specific responses are time

invariant. The subject-specific effects on the zero-inflation

probability model may or may not be correlated with the subject-

specific effect that operates on the Poisson expectation.

2) There are different subject-specific effects for each of the

five measurement periods, but there is some positive covariance

structure to the five subject-specific effects. Again, one

might want to consider a model in which the zero-inflation

random effects are independent of the expectation random effects

as well as a model in which the zero-inflation random effects

are correlated with the random effects operating on the

Poisson expectation.

Before going into the code for modeling the random effects which

would be appropriate for this repeated measures design, let me

first point you to a more complete discussion of ZIP models than

the posting which you found in the archives. The more complete

posting is also in the archives at

http://listserv.uga.edu/cgi-bin/wa?A2=ind0208A&L=sas-l&P=R16978&D=0

Now, when you look at that posting, you see that we have two

eta's, one which models the zero-inflation probability and one

which models the Poisson expectation. You probably should add

random effects to each of these linear terms. Time invariant

random effects would be modeled as

proc nlmixed data=mydata;

eta_prob = b0_prob + b1_prob*x1 + b2_prob*x2;

eta_prob = eta_prob + g0_prob;

p_0 = exp(eta_prob)/(1 + exp(eta_prob));

eta_lambda = b0_lambda + b1_lambda*x1 + b2_lambda*x2;

eta_lambda = eta_lambda + g0_lambda;

lambda = exp(eta_lambda);

/* likelihood structure for ZIP. Note that we cannot generate */

/* the log likelihood for the zero response values directly. We */

/* must generate the likelihood and then take the logarithm due */

/* to the additive nature of the zero likelihood. */

if y=0 then loglike = log(p_0 + (1-p_0)*exp(-lambda));

else loglike = log(1-p_0) + y*log(lambda) -lambda - lgamma(y+1);

model y ~ general(loglike);

random g0_prob g0_lambda ~

normal([0,0],

[exp(2*log_Vprob),

rho*exp(log_Vprob)*exp(log_Vlambda),

exp(2*log_Vlambda)]) subject=subject;

Here I have modeled a nonzero covariance between the zero-

inflation random effect and the Poisson expectation random effect.

If you think that these two terms should be uncorrelated, then

you would just change the random statement to

random g0_prob g0_lambda ~

normal([0,0],

[exp(2*l

appreciate your time.

Thanks again

David

-----Original Message-----

From: Dale McLerran [mailto: XXXX@XXXXX.COM ]

Sent: Wednesday, February 18, 2004 1:24 PM

To: David Neal; XXXX@XXXXX.COM

Subject: Re: Zero Inflated Poisson Models in SAS (repeated measures)

David,

I am glad to see that repeated measures were obtained at fixed

time points. Since the observations are not equally spaced and

include observations in different phases of the experimental

design (pre-treatment, post-treatment, and follow-up measures),

I would think that either of two different models would be

appropriate:

1) Each participant has a subject-specific stochastic element

affecting the probability of having a zero value as well as a

stochastic element affecting the expectation of the Poisson

component. That is, the subject-specific responses are time

invariant. The subject-specific effects on the zero-inflation

probability model may or may not be correlated with the subject-

specific effect that operates on the Poisson expectation.

2) There are different subject-specific effects for each of the

five measurement periods, but there is some positive covariance

structure to the five subject-specific effects. Again, one

might want to consider a model in which the zero-inflation

random effects are independent of the expectation random effects

as well as a model in which the zero-inflation random effects

are correlated with the random effects operating on the

Poisson expectation.

Before going into the code for modeling the random effects which

would be appropriate for this repeated measures design, let me

first point you to a more complete discussion of ZIP models than

the posting which you found in the archives. The more complete

posting is also in the archives at

http://listserv.uga.edu/cgi-bin/wa?A2=ind0208A&L=sas-l&P=R16978&D=0

Now, when you look at that posting, you see that we have two

eta's, one which models the zero-inflation probability and one

which models the Poisson expectation. You probably should add

random effects to each of these linear terms. Time invariant

random effects would be modeled as

proc nlmixed data=mydata;

eta_prob = b0_prob + b1_prob*x1 + b2_prob*x2;

eta_prob = eta_prob + g0_prob;

p_0 = exp(eta_prob)/(1 + exp(eta_prob));

eta_lambda = b0_lambda + b1_lambda*x1 + b2_lambda*x2;

eta_lambda = eta_lambda + g0_lambda;

lambda = exp(eta_lambda);

/* likelihood structure for ZIP. Note that we cannot generate */

/* the log likelihood for the zero response values directly. We */

/* must generate the likelihood and then take the logarithm due */

/* to the additive nature of the zero likelihood. */

if y=0 then loglike = log(p_0 + (1-p_0)*exp(-lambda));

else loglike = log(1-p_0) + y*log(lambda) -lambda - lgamma(y+1);

model y ~ general(loglike);

random g0_prob g0_lambda ~

normal([0,0],

[exp(2*log_Vprob),

rho*exp(log_Vprob)*exp(log_Vlambda),

exp(2*log_Vlambda)]) subject=subject;

Here I have modeled a nonzero covariance between the zero-

inflation random effect and the Poisson expectation random effect.

If you think that these two terms should be uncorrelated, then

you would just change the random statement to

random g0_prob g0_lambda ~

normal([0,0],

[exp(2*l

Similar Threads

1. Robust standard errors in Zero inflated Poisson and Zero inflated

I have used Proc Genmod and Repeated Subject statement to obtain robust standard errors in Poisson and negative binomial regression. Could anyone please tell me something about the STATEMENT AND possible SYNTAX that can be used to obtain robust standard errors in Zero inflated Poisson and Zero inflated negative binomial regression?

2. Bivariate Zero-Inflated Poisson Regression Model

3. a question about zero-inflated poisson model using proc nlmixed

For some coef. Estimates, I got ZERO standard error, which causes infty T-values. How could that happen? thank you so much!

4. GEE for zero-inflated Poisson models?

5. Zero inflated poisson model

Hello, Is it possible to encode in the genmod procedure a ZIP model (zero inflated poisson model) or did some one write a macro to do this ? Benoit Maris

6. Rate Ratio Interpretation in a Zero Inflated Poisson Model

7. a question about zero-inflated poisson model using proc

I'd recommend to use the proc means command before starting. You may have something suspicious going on with your explanatory variables. But it's hard to say without knowing more about the DGP. God Jul o Gott Nytt Ar! Tomas On 12/22/06, Wensui Liu < XXXX@XXXXX.COM > wrote: > > For some coef. Estimates, I got ZERO standard error, which causes > infty T-values. How could that happen? > > thank you so much! >

8. Modeling Zero-Inflated Regression Models Using SAS (Procedure IML)