Negative binomial v. ZINB: Plot probabilities

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Negative binomial v. ZINB: Plot probabilities

Ives, Melissa L

Good morning SPSS gurus!

 

We have an analysis using a propensity score (likely to be in inEMPS) split into quintiles to compare inEMP=1 to inEMPS=0.

We have run a Negative Binomial due to over-dispersion—but a question has been raised about why not a zero-inflated NB.

 

I have run both (using LOGISTIC and STATS_ZEROINFL) both overall and separately (split file for NB/select if in quintile for ZINB).

Now the question is: Which is better?  Since the AIC is only slightly lower for ZINB (around 30/>18000), I’ve been asked to

plot fitted probabilities of the observed data under the zero-inflated and the non-zero inflated model against each other”

 

I hope someone can help me with the (best) way to get these plots (within quintile) for NB and ZINB. 

This is my first attempt at ZINB. 

 

Here is the syntax I used for both

 

*** ZERO INFLATED NEGATIVE BINOMIAL USING nBH_EDPre (NUMBER of PRE ED visits).

STATS ZEROINFL MODELSOURCE=ESTIMATE DEPENDENT=nBH_EDPOST COUNTMODEL=inEMPS LR3pred nBH_EDPRE

  SAMEREGRESSORS=YES

  COUNTDIST=NEGBIN ZEROLINK=LOGIT

  /OPTIONS STARTVALUES=GENLIN OPTMETHOD=BFGS MAXITER=1000 TOL=0.0000000001

  /SAVE DATASET=ZI_NB_n

  ID=CID

  WORKSPACEACTION=CLEAR.

 

**************************.

****  With N Pre.

**************************.

LOGISTIC REGRESSION VARIABLES AnyBH_EDPOST

  /METHOD=ENTER inEMPS

  /METHOD=ENTER inEMPS nBH_EDPRE

  /PRINT=GOODFIT CI(95)

  /CRITERIA=PIN(0.05) POUT(0.10) ITERATE(20) CUT(0.5).

 

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

Melissa Ives

 




This correspondence contains proprietary information some or all of which may be legally privileged; it is for the intended recipient only. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this correspondence and completely dispose of the correspondence immediately. Please notify the sender if you have received this email in error. NOTE: Messages to or from the State of Connecticut domain may be subject to the Freedom of Information statutes and regulations.

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Negative binomial v. ZINB: Plot probabilities

Jon Peck
Where are you stuck?  Predicting with the STATS ZEROINFL model gives you a dataset containing the predicted values and probabilities.  If you merge this into the main dataset, you could do a scatterplot of the two sets of results.

On Thu, Nov 8, 2018 at 8:05 AM Ives, Melissa L <[hidden email]> wrote:

Good morning SPSS gurus!

 

We have an analysis using a propensity score (likely to be in inEMPS) split into quintiles to compare inEMP=1 to inEMPS=0.

We have run a Negative Binomial due to over-dispersion—but a question has been raised about why not a zero-inflated NB.

 

I have run both (using LOGISTIC and STATS_ZEROINFL) both overall and separately (split file for NB/select if in quintile for ZINB).

Now the question is: Which is better?  Since the AIC is only slightly lower for ZINB (around 30/>18000), I’ve been asked to

plot fitted probabilities of the observed data under the zero-inflated and the non-zero inflated model against each other”

 

I hope someone can help me with the (best) way to get these plots (within quintile) for NB and ZINB. 

This is my first attempt at ZINB. 

 

Here is the syntax I used for both

 

*** ZERO INFLATED NEGATIVE BINOMIAL USING nBH_EDPre (NUMBER of PRE ED visits).

STATS ZEROINFL MODELSOURCE=ESTIMATE DEPENDENT=nBH_EDPOST COUNTMODEL=inEMPS LR3pred nBH_EDPRE

  SAMEREGRESSORS=YES

  COUNTDIST=NEGBIN ZEROLINK=LOGIT

  /OPTIONS STARTVALUES=GENLIN OPTMETHOD=BFGS MAXITER=1000 TOL=0.0000000001

  /SAVE DATASET=ZI_NB_n

  ID=CID

  WORKSPACEACTION=CLEAR.

 

**************************.

****  With N Pre.

**************************.

LOGISTIC REGRESSION VARIABLES AnyBH_EDPOST

  /METHOD=ENTER inEMPS

  /METHOD=ENTER inEMPS nBH_EDPRE

  /PRINT=GOODFIT CI(95)

  /CRITERIA=PIN(0.05) POUT(0.10) ITERATE(20) CUT(0.5).

 

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

Melissa Ives

 




This correspondence contains proprietary information some or all of which may be legally privileged; it is for the intended recipient only. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this correspondence and completely dispose of the correspondence immediately. Please notify the sender if you have received this email in error. NOTE: Messages to or from the State of Connecticut domain may be subject to the Freedom of Information statutes and regulations.

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Negative binomial v. ZINB: Plot probabilities

Ives, Melissa L

Thanks Jon,

 

For the ZINB, the merging back into the main dataset is the bit I was missing. 

There are actually 5 datasets (one for each quintile) to combined and merge back, but that is simple.

 

And just to get the initial info correct… I used the GENLIN NegBin syntax below (not Logistic) to predict the number Post with a split file by quintile.

************************.

** N Pre .

************************.

**** NEG BIN SCALE=Pearson (to handle over dispersion)

* Generalized Linear Models (Negative Binomial w/log link per UMich 2010).

GENLIN nBH_EDPOST WITH inEMPS nBH_EDPRE

  /MODEL inEMPS nBH_EDPRE INTERCEPT=YES

DISTRIBUTION=NEGBIN(MLE) LINK=LOG

  /CRITERIA METHOD=FISHER(1) SCALE=PEARSON COVB=MODEL MAXITERATIONS=100 MAXSTEPHALVING=5

    PCONVERGE=1E-006(ABSOLUTE) SINGULAR=1E-012 ANALYSISTYPE=3(WALD) CILEVEL=95 CITYPE=WALD

    LIKELIHOOD=FULL

  /MISSING CLASSMISSING=EXCLUDE

  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION(EXPONENTIATED).

 

Today I reran this syntax with an added subcommand to get the probabilities for NB.

/SAVE XBPRED (NBnPred) XBSTDERROR (NBnStdErr).

 

Melissa

 

From: Jon Peck [mailto:[hidden email]]
Sent: Thursday, November 08, 2018 2:52 PM
To: Ives, Melissa L <[hidden email]>
Cc: SPSS List <[hidden email]>
Subject: Re: [SPSSX-L] Negative binomial v. ZINB: Plot probabilities

 

Where are you stuck?  Predicting with the STATS ZEROINFL model gives you a dataset containing the predicted values and probabilities.  If you merge this into the main dataset, you could do a scatterplot of the two sets of results.

 

On Thu, Nov 8, 2018 at 8:05 AM Ives, Melissa L <[hidden email]> wrote:

Good morning SPSS gurus!

 

We have an analysis using a propensity score (likely to be in inEMPS) split into quintiles to compare inEMP=1 to inEMPS=0.

We have run a Negative Binomial due to over-dispersion—but a question has been raised about why not a zero-inflated NB.

 

I have run both (using LOGISTIC and STATS_ZEROINFL) both overall and separately (split file for NB/select if in quintile for ZINB).

Now the question is: Which is better?  Since the AIC is only slightly lower for ZINB (around 30/>18000), I’ve been asked to

plot fitted probabilities of the observed data under the zero-inflated and the non-zero inflated model against each other”

 

I hope someone can help me with the (best) way to get these plots (within quintile) for NB and ZINB. 

This is my first attempt at ZINB. 

 

Here is the syntax I used for both

 

*** ZERO INFLATED NEGATIVE BINOMIAL USING nBH_EDPre (NUMBER of PRE ED visits).

STATS ZEROINFL MODELSOURCE=ESTIMATE DEPENDENT=nBH_EDPOST COUNTMODEL=inEMPS LR3pred nBH_EDPRE

  SAMEREGRESSORS=YES

  COUNTDIST=NEGBIN ZEROLINK=LOGIT

  /OPTIONS STARTVALUES=GENLIN OPTMETHOD=BFGS MAXITER=1000 TOL=0.0000000001

  /SAVE DATASET=ZI_NB_n

  ID=CID

  WORKSPACEACTION=CLEAR.

 

**************************.

****  With N Pre.

**************************.

LOGISTIC REGRESSION VARIABLES AnyBH_EDPOST

  /METHOD=ENTER inEMPS

  /METHOD=ENTER inEMPS nBH_EDPRE

  /PRINT=GOODFIT CI(95)

  /CRITERIA=PIN(0.05) POUT(0.10) ITERATE(20) CUT(0.5).

 

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

Melissa Ives

 

 



This correspondence contains proprietary information some or all of which may be legally privileged; it is for the intended recipient only. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this correspondence and completely dispose of the correspondence immediately. Please notify the sender if you have received this email in error. NOTE: Messages to or from the State of Connecticut domain may be subject to the Freedom of Information statutes and regulations.

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


 

--

Jon K Peck
[hidden email]




This correspondence contains proprietary information some or all of which may be legally privileged; it is for the intended recipient only. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this correspondence and completely dispose of the correspondence immediately. Please notify the sender if you have received this email in error. NOTE: Messages to or from the State of Connecticut domain may be subject to the Freedom of Information statutes and regulations.

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD