Displaying 20 results from an estimated 3000 matches similar to: "glm(quasipoisson) with non-integer response"
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)
.
.
.
(Dispersion parameter
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
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 available in the summary
2010 Sep 12
1
R-equivalent Stata command: poisson or quasipoisson?
Hello R-help,
According to a research article that covers the topic I'm analyzing,
in Stata, a Poisson pseudo-maximum-likelihood (PPML) estimation can be
obtained with the command
poisson depvar_ij ln(indepvar1_ij) ln(indepvar2_ij) ...
ln(indepvarN_ij), robust
I looked up Stata help for the command, to understand syntax and such:
www.stata.com/help.cgi?poisson
Which simply says
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 first steps for the solution are following:
range(b_dist_min_new)
2009 Aug 13
2
Fitting a quasipoisson distribution to univariate data
Dear all,
I am analyzing counts of seabirds made from line transects at sea.
I have been fitting Poisson and negative 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),
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 where
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)
2011 Apr 07
1
Quasipoisson with geeglm
Dear all,
I am trying to use the GEE methodology to fit a trend for the number of butterflies observed at several sites. In total, there are 66 sites, and 19 years for which observations might be available. However, only 326 observations are available (instead of 1254). For the time being, I ignore the large number of missing values, and the fact that GEE is only valid under MCAR. When I run the
2013 Jan 31
2
glm poisson and quasipoisson
Hello,
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
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
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
2001 Aug 01
1
glm() with non-integer responses
A question about the inner workings of glm() and dpois():
Suppose I call
glm(y ~ x, family=poisson, weights = w)
where y contains NON-INTEGER (but still nonnegative) values.
(a) Does glm() still correctly maximise
the weighted Poisson loglikelihood ?
(i.e. the function given by the same formal expression as the
weighted loglikelihood of independent Poisson variables Y_i
except that the
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". Their example is:
# Example with gam models (based on
2008 Aug 06
4
How to calculate GLM least square means?
Hello R-helpers,
I would like to calculate least square means after having built a GLM with
quasipoisson errors.
In my model the dependent variable is continuous, I have one continuous
independent variable and one categorical independent variable (that is the
variable for which I would like to calculate the least square means).
I've looked around for the command to calculate the least
2012 Oct 01
0
[Fwd: REML - quasipoisson]
Hi Greg,
For quasi families I've used extended quasi-likelihood (see Mccullagh
and Nelder, Generalized Linear Models 2nd ed, section 9.6) in place of
the likelihood/quasi-likelihood in the expression for the (RE)ML score.
I hadn't realised that this was possible before the paper was published.
best,
Simon
ps. sorry for slow reply, the original message slipped through my filter
for
2011 Feb 04
0
GAM quasipoisson in MuMIn - SOLVED
Hi,
Got my issues sorted.
Error 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
2009 Apr 11
0
Sean / Re: question related to fitting overdispersion count data using lmer quasipoisson
Hey Buddy,
Hope you have been doing well since last contact.
If you have the answer to the following 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
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,
2009 Apr 11
0
question related to fitting overdispersion count data using lmer quasipoisson
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.
The estimation results are very off (see model output of fit.lmer.over.quasi
below).
Can someone kindly explain to me what went wrong?
Many thanks in