[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sas-l
Subject:    Re: NLMIXED  Problem
From:       Dale McLerran <stringplayer_2 () YAHOO ! COM>
Date:       2004-04-30 21:19:49
[Download RAW message or body]

Hamani,

To be able to estimate a zero-inflated distribution requires that
we be able to partition the data as

    zero part - including zeroes from zero inflation process as
                well as zeroes from non-inflated distribution

    non-zero part

Now, the non-zero part must contain information about the
probability of the zero part which is from the non-inflated
distribution.  Consider a response which has Poisson distribution.
The non-zero part of the Poisson distribution can be used to
estimate the Poisson distribution parameters, subject to zeroes
censored from the distribution.  Once we know parameters of the
distribution based on the non-zero portion of the distribution,
we can estimate the probability of zero values given the
distribution of the non-zero values.

Now, if we have a bernoulli distribution, once we censor the zero
values from the distribution all we have left are responses with
value 1.  Under the bernoulli distribution, if all responses are
1, then the probability of a zero response is zero.  That is,
there is no way to censor the zeroes from the bernoulli distribution
and estimate a non-zero probability for the zero values.  Thus,
there can be no zero-inflated bernoulli (ZIB) distribution.

In my previous post I wrote this more succinctly (although in a
manner which may be less easily understood) as "Since all non-zero
bernoulli responses are 1, there is no distribution of the non-zero
responses which can give rise to an expectation of a zero
probability among the portion of the distribution which is not
zero-inflated."  Upon rereading that, I would modify it just
slightly to state "give rise to an expectation of a zeroes
probability" rather than "give rise to an expectation of a zero
probability".  A zero probability is P(X=x)=0 whereas a zeroes
probability is P(X=0)=p.  Hopefully, this makes clear why a ZIB
model cannot be estimated.

Dale


--- "Elmaache, Hamani" <Hamani.Elmaache@ccra-adrc.gc.ca> wrote:
>
> Hi Dale.
> I have lots of zeros in my reponse dependent variable, so I try to
> fit
> zero-inflated
> bernoulli (ZIB?) distribution. The proportion of zero is like 9
> percent.
> What I would do is getting estimted parameters and then I'll try to
> predicted the the ones (opposit to zero) by using Proc IML. I did
> this using
> just PROC LOGISTIC.
> Here, I'm trying to do it with ZIB and compare to result that I got
> from
> Logistic, and see wich one can predicted more the other.
>
> Thanks a lot.
> Hamani.
>
>
> -----Original Message-----
> From: Dale McLerran [mailto:stringplayer_2@yahoo.com]
> Sent: April 30, 2004 4:17 PM
> To: Elmaache, Hamani; SAS-L@LISTSERV.UGA.EDU
> Subject: Re: NLMIXED Problem
>
>
> Hamani,
>
> You have a mighty odd parameterization for the probability of
> the bernoulli response.  It rather appears as a zero-inflated
> bernoulli (ZIB?) distribution.  Since all non-zero bernoulli
> responses are 1, there is no distribution of the non-zero
> responses which can give rise to an expectation of a zero
> probability among the portion of the distribution which is not
> zero-inflated.  That statement may need some thinking about.
>
> The upshot is that there cannot be a zero-inflated bernoulli
> distribution.  Eliminate the parameter p0 and include in eta an
> itercept term.  You will then have a standard logit model for
> a bernoulli response.
>
> Which leads me to ask why you choose to use NLMIXED for fitting
> the model?  You don't have any random effects here.  PROC LOGISTIC
> (or GENMOD or even CATMOD) can fit the logistic regression model
> more easily than NLMIXED.  Sometimes I use NLMIXED when it is not
> really necessary just so that I can show how some likelihood model
> is constructed.  I don't believe that is the point here, is it?
>
> Dale
>
>
> --- "Elmaache, Hamani" <Hamani.Elmaache@CCRA-ADRC.GC.CA> wrote:
> > Hi there.
> >  I have some problems with this proc nlmixed. After running this
> > code, I get
> > always the following
> >  output: (see also the Log after).Can sombody help? Other question:
> > Is there
> > WEITH Option in proc nlmixed?
> >
> >
> >
> >                                          Specifications
> >
> >                 Data Set
> WORK.BASE
> >                 Dependent Variable                          compl
> >                 Distribution for Dependent Variable         General
> >                 Optimization Technique                      Trust
> > Region
> >                 Integration Method                          None
> >
> >
> >   proc nlmixed data=base  ;
> > parms  p0=  0.82
> >         AGE_CL0=-0.06 0.06
> >         OLD_15P0=-1.0
> >         mari_cl0=-1.1
> >         NETIN_CL0=1.
> >         EMPIN_CL0= 0.2
> >         GSTNB_CL0= -0.3
> >         ELGCH_NB0=0.02;
> >
> > ETA=AGE_CL0*AGE_CL +OLD_15P0*OLD_15P + mari_cl0*mari_cl
> >   +NETIN_CL0*NETIN_CL+ EMPIN_CL0*EMPIN_CL+GSTNB_CL0*GSTNB_CL
> > +ELGCH_NB0*ELGCH_NB;
> >       EXPETA=EXP(ETA);
> >    P=EXPETA/(1+EXPETA);
> >     if &response=0 then prob = p0
> > +(1-p0)*pdf('BERNOULLI',&response,p);
> >   else        prob = (1-p0)*pdf('BERNOULLI',&response,p);
> >   loglike = log(prob);
> >   model &response ~ general(loglike);
> > ods output ParameterEstimates=para
> >            (where=(Parameter not in( 'p0'  ) ));
> >   predict p out=phat;
> > run;
> >
> >
> >
> >  See   LOG:
> >
> > 12647      if &response=0 then prob = p0
> > +(1-p0)*pdf('BERNOULLI',&response,p);
> > 12648    else        prob = (1-p0)*pdf('BERNOULLI',&response,p);
> > 12649    loglike = log(prob);
> > 12650    model &response ~ general(loglike);
> > 12651  ods output ParameterEstimates=para
> > 12652             (where=(Parameter not in( 'p0'  ) ));
> > 12653    predict p out=phat;
> > 12654  run;
> >
> > NOTE: A finite difference approximation is used for the derivative
> of
> > the
> > PDF function at line
> >       12647 column 46.
> > NOTE: A finite difference approximation is used for the derivative
> of
> > the
> > PDF function at line
> >       12648 column 32.
> > NOTE: Execution error for observation 1.
> > WARNING: Output 'ParameterEstimates' was not created.
> > NOTE: The data set WORK.PHAT has 0 observations and 0 variables.
> > WARNING: Data set WORK.PHAT was not replaced because new file is
> > incomplete.
> > NOTE: PROCEDURE NLMIXED used:
> >       real time           0.04 seconds
> >       cpu time            0.03 seconds
>
>
> =====
> ---------------------------------------
> Dale McLerran
> Fred Hutchinson Cancer Research Center
> mailto: dmclerra@fhcrc.org
> Ph:  (206) 667-2926
> Fax: (206) 667-5977
> ---------------------------------------
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Win a $20,000 Career Makeover at Yahoo! HotJobs
> http://hotjobs.sweepstakes.yahoo.com/careermakeover


=====
---------------------------------------
Dale McLerran
Fred Hutchinson Cancer Research Center
mailto: dmclerra@fhcrc.org
Ph:  (206) 667-2926
Fax: (206) 667-5977
---------------------------------------




__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic