Hi, Dear R-help I know there are some R package to deal with zero-inflated count data. But I am now looking for R package to deal with zero-inflated continuous data. The response variable (Y) in my dataset contains a larger mount of zero and the Non-zero response are quite right skewed. Now what i am doing is first to use a logistic regression on covariates (X) to estimate the probability of Y being 0. Then focus on the dataset where Y is not zero, and run a linear regression or gamma glm to estimate the association between Y and X when Y is not zero. However, the linear regression and gamma glm model fit my data poorly. So, I am thinking maybe a zero inflated gamma or zero inflated lognormal regression are helpful, where I can estimate the probability of Y being zero and the association between non zero Y and X at the same time. However, I dont know which R package can do that. Hope I can get the answer soon.... and any suggestion about my dataset is truely appreciate. -- View this message in context: http://r.789695.n4.nabble.com/Can-R-do-zero-inflated-gamma-regression-tp3576120p3576120.html Sent from the R help mailing list archive at Nabble.com.
You might find Tweedie distributions helpful. See packages tweedie and statmod. Cheers, Simon. On 06/06/11 14:12, siriustar wrote:> Hi, Dear R-help > I know there are some R package to deal with zero-inflated count data. But I > am now looking for R package to deal with zero-inflated continuous data. > > The response variable (Y) in my dataset contains a larger mount of zero and > the Non-zero response are quite right skewed. Now what i am doing is first > to use a logistic regression on covariates (X) to estimate the probability > of Y being 0. Then focus on the dataset where Y is not zero, and run a > linear regression or gamma glm to estimate the association between Y and X > when Y is not zero. > However, the linear regression and gamma glm model fit my data poorly. > > So, I am thinking maybe a zero inflated gamma or zero inflated lognormal > regression are helpful, where I can estimate the probability of Y being zero > and the association between non zero Y and X at the same time. > However, I dont know which R package can do that. > > Hope I can get the answer soon.... and any suggestion about my dataset is > truely appreciate. > > > > -- > View this message in context: http://r.789695.n4.nabble.com/Can-R-do-zero-inflated-gamma-regression-tp3576120p3576120.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.-- Simon Blomberg, BSc (Hons), PhD, MAppStat. Lecturer and Consultant Statistician School of Biological Sciences The University of Queensland St. Lucia Queensland 4072 Australia T: +61 7 3365 2506 email: S.Blomberg1_at_uq.edu.au http://www.uq.edu.au/~uqsblomb/ Policies: 1. I will NOT analyse your data for you. 2. Your deadline is your problem Statistics is the grammar of science - Karl Pearson.
siriustar <qinlangjinan <at> live.cn> writes:> > Hi, Dear R-help > I know there are some R package to deal with zero-inflated count data. But I > am now looking for R package to deal with zero-inflated continuous data. > > The response variable (Y) in my dataset contains a larger mount of zero and > the Non-zero response are quite right skewed. Now what i am doing is first > to use a logistic regression on covariates (X) to estimate the probability > of Y being 0. Then focus on the dataset where Y is not zero, and run a > linear regression or gamma glm to estimate the association between Y and X > when Y is not zero. > However, the linear regression and gamma glm model fit my data poorly. > > So, I am thinking maybe a zero inflated gamma or zero inflated lognormal > regression are helpful, where I can estimate the probability of Y being zero > and the association between non zero Y and X at the same time. > However, I dont know which R package can do that.I think your 'conditional' strategy is quite useful in general, and may in general give you the same answers as the zero-inflated approach you're suggesting. Perhaps there are some other issues with the conditional (gamma GLM) parts of your analysis? Have you tried simple log-linear regression (i.e. assuming that the non-zero values are lognormally distributed)? I would recommend reading this thread in the r-sig-ecology mailing list: http://thread.gmane.org/gmane.comp.lang.r.ecology/2124