search for: quasipoisson

Displaying 20 results from an estimated 146 matches for "quasipoisson".

2003 Mar 12
2
quasipoisson, glm.nb and AIC values
Dear R users, I am having problems trying to fit quasipoisson and negative binomials glm. My data set contains abundance (counts) of a species under different management regimens. First, I tried to fit a poisson glm: > summary(model.p<-glm(abund~mgmtcat,poisson)) Call: glm(formula = abund ~ mgmtcat, family = poisson) . ....
2010 Sep 12
1
R-equivalent Stata command: poisson or quasipoisson?
...tand syntax and such: www.stata.com/help.cgi?poisson Which simply says that the command fits a Poisson regression of depvar on indepvars. However, in my google-searching, I noticed that pseudo- maximum-likelihood estimation is sometimes called 'quasi-maximum,' and that R has a "quasipoisson" family that seems to allow for overdispersion. So, am I missing something, or should I specify "quasipoisson" when implementing this estimation? Thanks a lot! Cheers, Wil
2010 Sep 11
3
confidence bands for a quasipoisson glm
Dear all, I have a quasipoisson glm for which I need confidence bands in a graphic: gm6 <- glm(num_leaves ~ b_dist_min_new, family = quasipoisson, data = beva) summary(gm6) library('VIM') b_dist_min_new <- as.numeric(prepare(beva$dist_min, scaling="classical", transformation="logarithm")). My...
2009 Aug 13
2
Fitting a quasipoisson distribution to univariate data
...ve binomial distributions to the data using the goodfit function from the vcd library. I would also like to evaluate how well a quasi-poisson distribution fits the data. However, none of the potentially suitable functions I have identified (goodfit(vcd), fitdistr(MASS), fit.dist(gnlm)) includes the quasipoisson distribution as one of their standard named distributions. Is the way forward to supply an appropriate density function to fitdistr, or is there some easier way to fit a quasipoisson distribution? Many thanks Nigel Harding Craigton Ecological Services 48 Craigend Drive West Milngavie Glasgow G62...
2007 Aug 03
1
extracting dispersion parameter from quasipoisson lmer model
Hi, I would like to obtain the dispersion parameter for a quasipoisson model for later use in calculating QAIC values for model comparison.Can anyone suggest a method of how to go about doing this? The idea I have now is that I could use the residual deviance divided by the residual degrees of freedom to obtain the dispersion parameter. The residual deviance is...
2010 Oct 19
2
Strange glm(, quasipoisson) error
Dear list, I have recently encountered an odd error when running glm(dep~indep, quasipoisson): while, with a subset of my data, I could get a perfectly reasonable model, once I include all of my data (17K+ observations, 29 variables), I get the following error: Error in if (any(y < 0)) stop("negative values not allowed for the quasiPoisson family") : missing value wh...
2008 Dec 01
1
Comparing output from linear regression to output from quasipoisson to determine the model that fits best.
R 2.7 Windows XP I have two model that have been run using exactly the same data, both fit using glm(). One model is a linear regression (gaussian(link = "identity")) the other a quasipoisson(link = "log"). I have log likelihoods from each model. Is there any way I can determine which model is a better fit to the data? anova() does not appear to work as the models have the same residual degrees of freedom: fit1<-glm(PHYSFUNC~HIV,data=KA) summary(fit1) fitQP<-glm(PHYSFU...
2009 Oct 05
2
GLM quasipoisson error
Hello, I'm having an error when trying to fit the next GLM: >>model<-glm(response ~ CLONE_M + CLONE_F + HATCHING +(CLONE_M*CLONE_F) + (CLONE_M*HATCHING) + (CLONE_F*HATCHING) + (CLONE_M*CLONE_F*HATCHING), family=quasipoisson) >> anova(model, test="Chi") >Error in if (dispersion == 1) Inf else object$df.residual : missing value where TRUE/FALSE needed If I fit the same model by using the Poisson distribution, it works. I have not a clue about where the problem could be. Do you have any idea or s...
2007 Apr 03
2
HPDinterval problem
...0 108.00 > summary(pv2toa[1:1392]) Min. 1st Qu. Median Mean 3rd Qu. Max. 0.00 4.00 7.00 11.94 15.00 108.00 > m1.16 <- lmer(o ~ pv1o + pv2o + pv1toa + pv2toa + sesblf + (pv1o | prov) + (pv1toa | prov) + (pv1o | pm) + (pv1toa | pm), data = mydata[1:1392,], family = quasipoisson) > m1.16 Generalized linear mixed model fit using Laplace Formula: o ~ pv1o + pv2o + pv1toa + pv2toa + sesblf + (pv1o | prov) + (pv1toa | prov) + (pv1o | pm) + (pv1toa | pm) Data: mydata[1:1392, ] Family: quasipoisson(log link) AIC BIC logLik deviance 2285 2390 -1123 2245 Random ef...
2008 Apr 17
2
glm(quasipoisson) with non-integer response
Hi, I have count data that have been meddled with enough to make them non integers. Using glm(poisson) returns a "non integer" error but glm(quasipoisson) does not. Just wondering if anyone knows if I am violating the assumptions of a quasipoisson error structure by using these non-integer response data? Thanks! I'd welcome your thoughts and/or references... Mark
2012 Sep 25
1
REML - quasipoisson
hi I'm puzzled as to the relation between the REML score computed by gam and the formula (4) on p.4 here: http://opus.bath.ac.uk/22707/1/Wood_JRSSB_2011_73_1_3.pdf I'm ok with this for poisson, or for quasipoisson when phi=1. However, when phi differs from 1, I'm stuck. #simulate some data library(mgcv) set.seed(1) x1<-runif(500) x2<-rnorm(500) linp<--0.5+x1+exp(-x2^2/2)*sin(4*x2) y<-rpois(500,exp(linp)) ##poisson #phi=1 m1<-gam(y~s(x1)+s(x2),family="poisson",method="REML...
2011 Apr 07
1
Quasipoisson with geeglm
...er MCAR. When I run the following code geeglm(SumOfButterflies ~ RES_YEAR, family = poisson, data = ManijurtNoNA, id = RES_ROTE_ID, corstr = "ar1") I obtain "normal" output. Not surprisingly, overdispersion is present (Estimated Scale Parameters: [1] 185.8571), so changing to quasipoisson is needed. However, the code below geeglm(SumOfButterflies ~ RES_YEAR, family = quasipoisson, data = ManijurtNoNA, id = RES_ROTE_ID, corstr = "ar1") produces the following error Error in geese.fit(xx, yy, id, offset, soffset, w, waves = waves, zsca, : variance invalid. Other correl...
2008 Oct 31
1
AIC for quasipoisson link
Dear fellows, I'm trying to extract the AIC statistic from a GLM model with quasipoisson link. The formula I'm referring to is AIC = -2(maximum loglik) + 2df * phi with phi the overdispersion parameter, as reported in: Peng et al., Model choice in time series studies os air pollution and mortality. J R Stat Soc A, 2006; 162: pag 190. Unfortunately, the function logLik does...
2012 Oct 01
0
[Fwd: REML - quasipoisson]
...sage slipped through my filter for mgcv related stuff > hi > > I'm puzzled as to the relation between the REML score computed by gam and > the formula (4) on p.4 here: > http://opus.bath.ac.uk/22707/1/Wood_JRSSB_2011_73_1_3.pdf > > I'm ok with this for poisson, or for quasipoisson when phi=1. > > However, when phi differs from 1, I'm stuck. > > #simulate some data > library(mgcv) > set.seed(1) > x1<-runif(500) > x2<-rnorm(500) > linp<--0.5+x1+exp(-x2^2/2)*sin(4*x2) > y<-rpois(500,exp(linp)) > > ##poisson > #phi=1 > m1...
2013 Jan 31
2
glm poisson and quasipoisson
...I have a question about modelling via glm. I have a dataset (see dput) that looks like as if it where poisson distributed (actually I would appreciate that) but it isnt because mean unequals var. > mean (x) [1] 901.7827 > var (x) [1] 132439.3 Anyway, I tried to model it via poisson and quasipoisson. Actually, just to get an impression how glm works. But I dont know how to interprete the data. Of course this is the case because my knowledge concerning logistic regressions is rather limited. Hoping there is somebody with mercy I would like to understand which parameters are important, e.g. whic...
2011 Feb 04
1
GAM quasipoisson in MuMIn
Hi, I have a GAM quasipoisson that I'd like to run through MuMIn package - dredge - gettop.models - model.avg However, I'm having no luck with script from an example in MuMIn help file. In MuMIn help they advise "include only models with smooth OR linear term (but not both) for each variable". The...
2011 Feb 04
0
GAM quasipoisson in MuMIn - SOLVED
...message solved: I heard from the guy who developed MuMIn and his suggestion worked. "As for the error you get, it seems you are running an old version of MuMIn. Please update the package first." I did (I was only 1 version behind in both R and in MuMIn) and error disappeared! Running quasipoisson GAM in MuMIn: As for my questions on GAM and " to include only models with smooth OR linear term (but not both) for each variable", as Gavin said, this refers only to global models with both smooth and linear terms for the *same*variables....which I didn't have. Regards, Karen On 4...
2009 Apr 11
0
Sean / Re: question related to fitting overdispersion count data using lmer quasipoisson
...lowing question, please let me know. If you have chance to travel up north. let me know. best, -Sean ---------- Forwarded message ---------- From: Sean Zhang <seanecon@gmail.com> Date: Sat, Apr 11, 2009 at 12:12 PM Subject: question related to fitting overdispersion count data using lmer quasipoisson To: r-help@r-project.org Cc: seanecon@gmail.com Dear R-helpers: I have a question related to fitting overdispersed count data using lmer. Basically, I simulate an overdispsed data set by adding an observation-level normal random shock into exp(....+rnorm()). Then I fit a lmer quasipoisson model....
2012 Oct 14
2
Poisson Regression: questions about tests of assumptions
I would like to test in R what regression fits my data best. My dependent variable is a count, and has a lot of zeros. And I would need some help to determine what model and family to use (poisson or quasipoisson, or zero-inflated poisson regression), and how to test the assumptions. 1) Poisson Regression: as far as I understand, the strong assumption is that dependent variable mean = variance. How do you test this? How close together do they have to be? Are unconditional or conditional mean and variance u...
2003 Aug 15
0
quasipoisson, test="F" or "Chi"
Hi, Please can someone tell me if this is correct for significance tests on count data; 1: If overdispersed, use quasipoisson, drop1(model, test="Chi"), 2: If not overdispersed, use (poisson or quasipoisson), drop1(model, test="Chi"). Thanks for your time, Martin. Martin Hoyle, School of Life and Environmental Sciences, University of Nottingham, University Park, Nottingham, NG7 2RD, UK Webpage: http:...