similar to: deviance in glm

Displaying 20 results from an estimated 10000 matches similar to: "deviance in glm"

2011 Apr 15
3
GLM output for deviance and loglikelihood
It has always been my understanding that deviance for GLMs is defined by; D = -2(loglikelihood(model) - loglikelihood(saturated model)) and this can be calculated by (or at least usually is); D = -2(loglikelihood(model)) As is done so in the code for 'polr' by Brian Ripley (in the package 'MASS') where the -loglikehood is minimised using optim; res <-
2003 Aug 27
2
Basic GLM: residuals definition
Dear R Users, I suppose this is a school boy question, but here it is anyway. I'm trying to re-create the residuals for a poisson GLM with simulated data; x<-rpois(1000,5) model<-glm(x~1,poisson) my.resids<-(log(x)- summary(model)$coefficients[1]) plot(my.resids,residuals(model)) This shows that my calculated residuals (my.resids) are not the same as residuals(model). p 65 of
2006 Feb 27
1
Different deviance residuals in a (similar?!?) glm example
Dear R-users, I would like to show you a simple example that gives an overview of one of my current issue. Although my working setting implies a different parametric model (which cannot be framed in the glm), I guess that what I'll get from the following example it would help for the next steps. Anyway here it is. Firstly I simulated from a series of exposures, a series of deaths (given a
2004 Mar 16
2
glm questions --- saturated model
> -----Original Message----- > From: r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of David Firth > Sent: Tuesday, March 16, 2004 1:12 PM > To: Paul Johnson > Cc: r-help at r-project.org > Subject: Re: [R] glm questions > > > Dear Paul > > Here are some attempts at your questions. I hope it's of some help.
2004 Mar 16
2
glm questions
Greetings, everybody. Can I ask some glm questions? 1. How do you find out -2*lnL(saturated model)? In the output from glm, I find: Null deviance: which I think is -2[lnL(null) - lnL(saturated)] Residual deviance: -2[lnL(fitted) - lnL(saturated)] The Null model is the one that includes the constant only (plus offset if specified). Right? I can use the Null and Residual deviance to
2002 Jan 18
3
How do I know if the deviance of a glm fit was fixed?
I'm writing functions that need to behave differently for GLMs like binomial and Poisson with fixed deviance, and those like normal or gamma or quasi where the deviance is estimated from the data. Given a glm object, is there a simple way to tell this directly, or do I have to look at the name of the family? Duncan Murdoch
2009 May 27
1
Deviance explined in GAMM, library mgcv
Dear R-users, To obtain the percentage of deviance explained when fitting a gam model using the mgcv library is straightforward: summary(object.gam) $dev.expl or alternatively, using the deviance (deviance(object.gam)) of the null and the fitted models, and then using 1 minus the quotient of deviances. However, when a gamm (generalizad aditive mixed model) is fitted, the
2009 Mar 17
2
bigglm() results different from glm()
Dear all, I am using the bigglm package to fit a few GLM's to a large dataset (3 million rows, 6 columns). While trying to fit a Poisson GLM I noticed that the coefficient estimates were very different from what I obtained when estimating the model on a smaller dataset using glm(), I wrote a very basic toy example to compare the results of bigglm() against a glm() call. Consider the
2012 Jul 27
2
producing a graph with glm poisson distributed respons count data and categorical independant variables
Hello, I am working on my thesis and can't really figure out how to produce a reasonable graph from the output from my glm., I could just give the R-output in my results and then discuss them, but it would be more interesting if I could visualise what is going on. My research is how bees react to different fieldmargins, for this I have 4 different types of field margin (A,B,C & D) and
2002 Jan 04
1
glm deviance question
I am comparing the Splus and R fits of a simple glm. In the following, foo is generated from rbinom with size = 20 p = 0.5. The coefficients (and SE's0 of the fitted models are the same, but the estimated deviances are quite different. Could someone please tell me why they are so different? I am using R version 1.3.1 and Splus 2000 release 3 on windows 2000. ++++++++++++++++++++++ foo
2008 Jan 10
0
Residual deviance in glm
I'm running a categorical data analysis with a two-way design of nominal by ordinal structure like the Political Ideology Example (Table 9.5) in Agresti's book Categorical Data Analysis. The nominal variable is Method while the ordinal variable is Quality (Bad, Moderate, Good, Excellent). I rank/quantify Quality with another variable QualityR (1, 2, 3, 4), and run the following:
2005 Feb 02
1
anova.glm (PR#7624)
There may be a bug in the anova.glm function. deathstar[32] R R : Copyright 2004, The R Foundation for Statistical Computing Version 2.0.1 (2004-11-15), ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project
2006 Mar 08
1
power and sample size for a GLM with Poisson response variable
Craig, Thanks for your follow-up note on using the asypow package. My problem was not only constructing the "constraints" vector but, for my particular situation (Poisson regression, two groups, sample sizes of (1081,3180), I get very different results using asypow package compared to my other (home grown) approaches. library(asypow) pois.mean<-c(0.0065,0.0003) info.pois <-
2013 May 29
1
quick question about glm() example
I don't have a copy of Dobson (1990) from which the glm.D93 example is taken in example("glm"), but I'm strongly suspecting that these are made-up data rather than real data; the means of the responses within each treatment are _identical_ (equal to 16 2/3), so two of the parameters are estimated as being zero (within machine tolerance). (At this moment I don't understand
2011 Oct 21
2
glm-poisson fitting 400.000 records
Hi, I am trying to fi a glm-poisson model to 400.000 records. I have tried biglm and glmulti but i have problems... can it really be the case that 400.000 are too many records??? I am thinking of using random samples of my dataset..... Many thanks, -- View this message in context: http://r.789695.n4.nabble.com/glm-poisson-fitting-400-000-records-tp3925100p3925100.html Sent from the R help
2010 Nov 27
1
d.f. in F test of nested glm models
Dear all, I am fitting a glm to count data using poison errors with the log link. My goal is to test for the significance of model terms by calling the anova function on two nested models following the recommendation in Michael Crawley's guide to Statistical Computing. Without going into too much detail, essentially, I have a small overdispersion problem (errors do not fit the poisson
2009 Jul 03
2
bigglm() results different from glm()
Hi Sir, Thanks for making package available to us. I am facing few problems if you can give some hints: Problem-1: The model summary and residual deviance matched (in the mail below) but I didn't understand why AIC is still different. > AIC(m1) [1] 532965 > AIC(m1big_longer) [1] 101442.9 Problem-2: chunksize argument is there in bigglm but not in biglm, consequently,
2005 Nov 08
1
Output glm
Hello, How can I obtain the likelihood ratio of a Poisson regression model? Regards. _____________________________________________ dr. Marziliano Ciro Facolta' di Economia Universita' degli Studi di L'Aquila p.zza del Santuario, 19 67040 Roio Poggio, L'Aquila tel.: 0862 434836 fax: 0862 434803
2008 Aug 07
1
incorrect usage of glmer crashes R (PR#12375)
Full_Name: susscorfa Version: 2.7.1 OS: ubuntu Submission from: (NULL) (129.125.177.31) Incorrect implementation of the grouping variable in the function glmer crashes R a small example: require(lme4); a<-data.frame(b=rpois(1000,10), c=gl(20,50), d=rnorm(1000,3), e=rnorm(1000,5), f=rnorm(1000,2)+5); glmer(b~d+f|c+(e), family=poisson, data=a) It crashes R on debian linux (2 independant
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)