Return to Stat Tools Home

Title: ZIP Check Fit

Evaluate this tool by clicking on the stars:

%VOTE{id="EvalStatTools" stars1="Tools Overall Rating" stars2="Code Works Well" stars3="Good Instructions" global="off" open="off" secret="off" format="| $key | $small
Score: $score, My vote: $mylast, Total votes: $sum |" }%

Add Comments and then click on "Add comment" button

Please note any errors found in the macros.

%COMMENT%

StatToolsForm edit

Type of Tool SAS Macro
Title ZIP Check Fit
Programmer/Email YinglinXia
Contributing Site Rochester
Description ZIP Check Fit is a macro that tests for goodness of fit when modeling count data in the presence of a preponderance of zeros. It first checks the distribution for all variables (response and covariates) of interest and plots the distribution of response variable, and then compares the Zero-Inflated Poisson (ZIP) Model with the Poisson Model using the Vnong test. Finally, the final ZIP full and null models are fitted and tested using Chi-Squared test. The SAS PROC GENMOD is used to carry out the test and modeling.
Vuong (1989) developed a statistic test for comparing two statistical models. This test is widely used for comparing two competing models for better fit for count data. As described in Long (1997), this statistic has a standard normal distribution, with a large positive (negative) value favoring one (the other) distribution, and a value close to zero indicating that neither model fits the data well. In this Macro, the test is implemented in such a way that a large positive (negative) value favors the ZIP (Poisson); if the Vuong statistic V is greater (less) than 1.96 (-1.96), the ZIP (Poisson) is preferred.


Example Example code
Classification Graph Type
References Long, J. S. (1997). Regression Models for Categorical and Limited Dependent Variables. Thousand Oaks, CA: Sage Publications.

Vuong, Q. H. (1989). Likelihood ratio tests for model selection and non-nested hypotheses. Econometrica 57: 307\x96333.
Datasets
Data
Software Program SAS
Software SAS
Macro Parameters The macro parameters are as follows:

DSname =name of SAS data set
DepVar =name of outcome variable
ClassVar =name of categorical variable(s)
IndepVar =name of predictor variable(s)
ZeroInflatVar =name of zero inflated variable
format =output format
R-Code - Attachment
R-Code
SAS-Code - Attachment Rochester_Zip Check Fit_Main Macro
SAS-Code
Stata-Code - Attachment
Stata-Code
Other Code - Attachment
Other Code
Called Data Manipulation
Called Tool/Utility
Called Checking Macro
Called Other
Creation-Date
Revision-Date September 09, 2010
Example Code SAS Example Code
Example Output SAS Example Output
SAS Examples
SAS_Example_Code Rochester_ZIP Check Fit_SAS Example Code
SAS_Example_Output Rochester_ZIP Check Fit_SAS Example Output RTF
Rochester_ZIP Check Fit _SAS Example Output html
Rochester_ZIP Check Fit_SAS Example Output mht
R Examples
R_Example_Code
R_Example_Output
Stats Examples
Special Features
Special Features Attached
Special Features Text
Notes1-Legend Section with calls to needed macros
Notes1
Notes2-Legend Macro call with fully specified parameters
Notes2
Notes3-Legend Section with definitions of global macro parameters
Notes3
Notes4-Legend Section with definitions of local macro variables
Notes4
See Also
Checklists
Stat Tools Disclaimer This SAS macro is developed by Dr. Yinglin Xia in consultation with Dr. Xin Tu and other members in the Department of Biostatistics and Computational Biology at the University of Rochester under the auspice of the CTSI BERD with the intent to facilitate data analyses and reporting in clinical and related research. It is copyrighted by Dr. Yinglin Xia, September, 2010 and distributed for free public access. The development of this macro was supported in part by an NIH grant R21/R33 DA027521.
Discliamer The views expressed within CTSpedia are those of the author and must not be taken to represent policy or guidance on the behalf of any organization or institution with which the author is affiliated.
Permission Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT OLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Reference Image
This topic: CTSpedia > WebHome > StatToolsHome > StatToolsTopic021
Topic revision: 06 Apr 2012, MaryBanach
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback