search for: pscl

Displaying 20 results from an estimated 56 matches for "pscl".

Did you mean: pocl
2012 Sep 10
1
Zero inflated Models- pscl package
Dear R users, I want to apply zero inflated models with continuous and categorical variables and I used pscl package from R and the zeroinf() function. My question are the follow: a) The value of fitted.values is mu or (1-p)*mu? where p is the probability of zero came form a zero point mass b) If mu is zero, how do i know if it is a zero from the zero point mass or from the count process? Thank you s...
2011 Jul 31
2
zero truncated poisson regression
Dear friends, does anyone know how I can run a zero truncated poisson regression using R (or even SPSS)?   Dr. Iasonas Lamprianou Department of Social and Political Sciences University of Cyprus [[alternative HTML version deleted]]
2006 Jul 20
0
Convergence warnings from zeroinfl (package pscl)
Dear R-Helpers, Can anyone please help me to interpret warning messages from zeroinfl (package pscl) while fitting a zero inflated negative binomial model? The console reports convergence and the parameters seam reasonable, but these <<Warning messages: 1: algorithm did not converge in: glm.fit(X, Y, family = poisson()) 2: fitted rates numerically 0 occurred in: glm.fit(X, Y, family = p...
2008 Sep 19
0
problems with too many NA in the function ideal() from pscl package.
Hi all, I'm trying to run some monte carlo simulation for my roll call data using the ideal() function, which resides in the pscl package. However, I'm receiving an error message that I don't understand. Error in ideal(a, maxiter = 1000, thin = 10, burnin = 50, store.item = TRUE, : NA/NaN/Inf in foreign function call (arg 13) my code is simple the following: > m_a <- ideal(a, maxiter = 1000, thin...
2011 May 04
1
hurdle, simulated power
Hi all-- We are planning an intervention study for adolescent alcohol use, and I am planning to use simulations based on a hurdle model (using the hurdle() function in package pscl) for sample size estimation. The simulation code and power code are below -- note that at the moment the "power" code is just returning the coefficients, as something isn't working quite right. The average estimates from code below are: count_(Intercept) count_trt zero_(...
2010 Feb 25
1
Zero inflation model - pscl package
...me). Therefore I need to account for the effort. If change the count (response variable) then it will have decimals and not be usable in this model. So I decided to put this term into the independent variable. I am analyzing Historic vs. Current surveys. Here is an example of my code: require(pscl) model <- zeroinfl(Sallys~Survey:Person.Hours, dist="poisson", EM=TRUE) summary(model) I have received some very significant results on most of them and on some that I thought wouldn't be significant turned out to be. So I am concerned with the model being appropriate. I created...
2010 Apr 19
2
plotting RR, 95% CI as table and figure in same plot
...mselves. Thus, I'm looking at a recent JAMA article in which both numbers and dotplot of RR and 95% CI are presented and wondering about best way to do this in R. Essentially, the plot has 3 columns: variable names, RR and 95% CI, and dotplot of the same. Using the bioChemists data in the pscl package and errbar function in Hmisc package, the code below is in the right direction... but still pretty ugly. Wondering if folks would have alternative suggestions about how to go about this, or pointers on cleaning up the code below (eg, I know there are many functions for plotting errbars...
2008 Feb 18
1
fitted.values from zeroinfl (pscl package)
Hello all: I have a question regarding the fitted.values returned from the zeroinfl() function. The values seem to be nearly identical to those fitted.values returned by the ordinary glm(). Why is this, shouldn't they be more "zero-inflated"? I construct a zero-inflated series of counts, called Y, like so: b= as.vector(c(1.5, -2)) g= as.vector(c(-3, 1)) x <- runif(100) # x
2012 Jan 17
2
pscl package and hurdle model marginal effects
This request is related to the following post from last year: https://stat.ethz.ch/pipermail/r-help/2011-June/279752.html After reading the thread, the idea is still not clear. I have fitted a model using HURDLE from the PSCL package. I am trying to get marginal effects / slopes by multiplying the coefficients by the mean of the marginal effects (I think this is right). To my understanding, this will require a mean for the binary probability model and a mean for the truncated Poisson count model. My guess is that I...
2017 Jun 02
1
modEvA D-squared for gamma glm
...edictors). I want to calculate r-squared for this model. I have been reading online about it and found there are multiple formulas for calculating R2 (psuedo) for glm (in R) with gaussian (r2 from linear model), logistic regression (1-deviance/null deviance), poisson distribution (using pR2 in pscl package, D-squared value from modEvA R package). But I could not find anything specific to gamma distributions. Can pscl and modEVA packages be used for gamma distributions as well? or there is any other formula for doing the same? Thanks Regards, Anchal -- Anchal Sharma, PhD Postdoctoral Fel...
2018 Feb 16
1
hurdle model - count and response predictions
Hello, I'm using pscl to run a hurdle model. Everything works great until I get to the point of making predictions. All of my "count" predictions are lower than my actual data, and lower than the "response" predictions, similar to the issue described here ( https://stat.ethz.ch/pipermail&...
2008 Dec 16
1
Prediction intervals for zero inflated Poisson regression
Dear all, I'm using zeroinfl() from the pscl-package for zero inflated Poisson regression. I would like to calculate (aproximate) prediction intervals for the fitted values. The package itself does not provide them. Can this be calculated analyticaly? Or do I have to use bootstrap? What I tried until now is to use bootstrap to estimate these...
2013 Jul 23
0
percent correctly predicted (PCP) zeros for hurdle model
Hello all, I am using the hurdle model for fitting my count data using the pscl package which is working fine. However, I am stuck with the problem of calculating the percent correctly predicted (PCP) zeros for hurdle model. The method I am trying to use to achieve this is 'hitmiss' in the pscl package (ref: http://www.inside-r.org/packages/cran/psc...
2018 Apr 09
2
Warning en modelo ZINB
Buenas tardes, Estoy estimando un modelo binomial negativo de ceros inflados (ZINB) utilizando el comando zeroinfl() del paquete pscl. Al ejecutarlo me da el siguiente aviso: Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred ¿Sabéis que significa y si puedo usar el modelo aún con ese aviso? ¿Los coeficientes son fiables? Muchas gracias, Miriam
2010 Feb 04
1
Zero inflated negat. binomial model
...intensity and chick size (defined as CAPI). Intensity is clearly overdispersed, with way too many zeroes. I'm interested in looking at the association between these two variables, i.e. how well does chick size predict tape intensity? I fit a zero inflated negat. binomial model using the "pscl" package. I built my model as follows and got the output below. > model <- zeroinfl(Int_Cesto ~ CAPI, dist = "negbin", EM = TRUE) > model Call: zeroinfl(formula = Int_Cesto ~ CAPI, dist = "negbin", EM = TRUE) Count model coefficients (negbin with log link): (...
2011 Apr 08
1
multinom() residual deviance
...ing, however, I don't know what the warning exactly means and hence do not know what the difference between the residual deviance of the former (binary) and the latter (multinomial) model is. (I need the deviances to calculate some of the pseudo R-squares with function pR2(), package "pscl".) Could you give good advice? Thanks *S* -- Sascha Vieweg, saschaview at gmail.com
2009 Mar 22
1
Multiple Comparisons for (multicomp - glht) for glm negative binomial (glm.nb)
...e data split into a treatment factor (instead of semio and CO2 level) but I can not get convergence with glm.nb I think this may be to do with to many zeros in the data set, do you know if glht or another multiple comparison will work or zeroinflated negative binomial regression(zeroinfl() from the pscl library)? Any help or ideas will be gratefully appreciated. Many thanks in advance. Lara semiochemical <-read.csv("G:/semiochemical_data.csv", header=T) semiochemical$location2<-factor(semiochemical$location) levels(semiochemical$location2)<-c("1","2&q...
2008 Jun 05
1
GAM hurdle models
Hello, I have been using mgcv to run GAM hurdle models, analyzing presence/absence data with GAM logistic regressions, and then analyzing the data conditional on presence (e.g. without samples with no zeros) with GAMs with a negative binomial distribution. It occurs to me that using the negative binomial distribution on data with no zeros is not right, as the negative binomial allows
2009 Jun 24
0
Goodness of fit test / pseudo r^2 measure for Zero Inflated Model
Hi I have been using a Zero-Inflated negative binomial model fitted using the pscl zeroinfl command but I would like to extract a goodness of fit measure are there any suitable pseudo R^2 measures available for this type of analysis to try and assess the amount of variation in the data explained by the model? I have tried with the pR2 command in pscl (for computing various ps...
2010 Jun 21
1
ZINB by Newton Raphson??
Dear all.. I have a respon variable y. Predictor variable are x1, x2, x3, x4, x5 (1) What is the syntax to get paramater estimation of ZINB Model by Newton Raphson (not BFGS) (2) What syntax to plot probability of observed & predicted of ZINB Thx. Regards Krist. [[alternative HTML version deleted]]