Displaying 20 results from an estimated 109 matches for "pscl".
Did you mean:
pecl
2011 Mar 04
1
AIC on GLMM pscl package
Hello,
I'm using GLMM on the pscl package and i'm not getting the AIC on the
summary.
The code i'm using is (example) :
mmall3 <-glmmPQL(allclues ~ cycloc + male, data=dados, family=poisson,
random=~1|animal/idfid)
and the results:
Linear mixed-effects model fit by maximum likelihood
Data: dados
AIC BIC logLik...
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...
2012 Oct 12
1
R not finding function in installed pscl package
Hi,
This may be such a general question that my searches are just failing. I
installed the pscl lib, all appears fine, installed it several different
ways to be sure, but I am getting:
Error: could not find function "zeroinfl"
I double checked my spelling of the function and that it had not been
evolved out of the package. It is in the same location as the other
libraries that are l...
2005 Dec 02
1
Zero-inflated neg.bin. model and pscl package
Dear list,
I'm currently trying to develop a model to assess clam yield potential in a
lagoon. I'm using the zeroinfl function of the pscl package to fit a
Zero-inflated negative binomial model, given the high occurrence of zero
counts.
I don't understand from the sentence in the pscl guide "Zero-inflated count
models are a type of two-component mixture model, with a component for zero
counts, and the other component for the...
2009 Jan 22
1
help using zeroinfl()
Hi all,
I have been trying to use zeroinfl() with the pscl package with R version 2.1.1. and with the newest versions of the contrib packages compatible with R 2.1.1.
I have read the examples, the vignette and all the posts relating to zeroinfl() but I am still confused as to how to structure the model.
Here is a small example; the error message is the s...
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 = 10, b...
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...
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...
2009 Jul 18
2
Zinb for Non-interger data
Sorry bit of a Newbie question, and I promise I have searched the forum
already, but I'm getting a bit desperate!
I have over-dispersed, zero inflated data, with variance greater than the
mean, suggesting Zero-Inflated Negative Binomial - which I attempted in R
with the pscl package suggested on
http://www.ats.ucla.edu/stat/R/dae/zinbreg.htm
However my data is non-integer with some pesky decimals (i.e. 33.12) and
zinb / pscl doesn't like that - not surprising as zinb is for count data,
normally whole integers etc.
Does anyone know of a different zinb package that...
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 woul...
2011 Jul 12
2
Deviance of zeroinfl/hurdle models
Dear list, I'm wondering if anyone can help me calculate the deviance
of either a zeroinfl or hurdle model from package pscl?
Even if someone could point me to the correct formula for calculating
the deviance, I could do the rest on my own.
I am trying to calculate a pseudo-R-squared measure based on the
R^{2}_{DEV} of [1], so I need to be able to calculate the deviance of
the full and null models. Does anyone have any...
2017 Jun 02
1
modEvA D-squared for gamma glm
...w
predictors). 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...
2006 Jan 18
4
negative predicted values in poisson glm
Dear R helpers,
running the following code of a glm model of the family poisson, gives
predicted values < 0. Why?
library(MASS)
library(stats)
library(mvtnorm)
library(pscl)
data(bioChemists)
poisson_glm <- glm(art ~ fem + mar + kid5 + phd + ment, data = bioChemists,
family = poisson)
predicted.values = predict(poisson_glm)
range(predicted.values)
Thank you in advance for any hints.
Best regards,
P. Olsson
[[alternative HTML version deleted]]
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/r-help/2012-...
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...
2005 May 17
1
Vuong test
Hi,
I have two questions. First, I'd like to compare a ZINB model to a negativ
binomial model with the Vuong test, but I can't find how to performe it from
the zicount package. Does a programm exist to do it ?
Second, I'd like to know in which cases we have to use a double hurdle model
instead of a zero inflated model.
Many thanks,
St??phanie Payet
REES France
R??seau
2011 Oct 11
1
Count model prediction
Hello ;
I am doing a regression of count data (number of award and there are some
covariates)
I have estiamted the parameters of negative binomial distribuion (lambda is
a function of covaraites, GLM model) by glm.nb function and training
dataset.
Now I want to predict the number of award (for example y=0, y=1, y=2,) or
testing dataset. I dont know how to calculate this numbers?
I would be very