similar to: How to extract the Deviance of a glm fit result

Displaying 20 results from an estimated 3000 matches similar to: "How to extract the Deviance of a glm fit result"

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
2006 Apr 23
1
lme: null deviance, deviance due to the random effects, residual deviance
A maybe trivial and stupid question: In the case of a lm or glm fit, it is quite informative (to me) to have a look to the null deviance and the residual deviance of a model. This is generally provided in the print method or the summary, eg: Null Deviance: 658.8 Residual Deviance: 507.3 and (a bit simpled minded) I like to think that the proportion of deviance 'explained' by the
2011 Nov 10
1
Sum of the deviance explained by each term in a gam model does not equal to the deviance explained by the full model.
Dear R users, I read your methods of extracting the variance explained by each predictor in different places. My question is: using the method you suggested, the sum of the deviance explained by all terms is not equal to the deviance explained by the full model. Could you tell me what caused such problem? > set.seed(0) > n<-400 > x1 <- runif(n, 0, 1) > ## to see problem
2009 Jan 07
0
Residual deviance (cross-post from sci.stat.consult)
Dear all, I'm trying to fit a statistical model to series of measurements. Unfortunately, my knowledge of statistics is rather limited, so I'm a bit at loss of what is going on with the model. First of all, I've prepared a histogram. Then, I've tried to fit a Poisson model to express the relation between the middle points of classes (mids) and the corresponding frequencies
2010 Dec 29
4
need help
hello all, i need a clarification on a aspect... to be very frank, i am very new to linux. installed it for 1st time last week. i have installed Linux Mint OS. it has wine 1.2.1 preinstalled. ( my desktop also has Windows 7 as 2nd OS) my Question: 1. should i have to install any supporting applications to make wine work better? 2. i am a game freak. i have installed certain games in my
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
2013 Feb 12
0
Deviance and AIC in weighted NLS
Dear All, I encounter some discrepancies when comparing the deviance of a weighted and unweigthed model with the AIC values. A general example (from 'nls'): DNase1 <- subset(DNase, Run == 1) fm1DNase1 <- nls(density ~ SSlogis(log(conc), Asym, xmid, scal), DNase1) Now for a weighted fit: fm2DNase1 <- nls(density ~ SSlogis(log(conc), Asym, xmid, scal),
2012 Jan 16
1
GAM without intercept reports a huge deviance
Hi all, I constructed a GAM model with a linear term and two smooth terms, all of them statistically significant but the intercept was not significant. The adjusted r2 of this model is 0.572 and the deviance 65.3. I decided to run the model again without intercept, so I used in R the following instruction: regression= gam(dependent~ +linear_independent +s(smooth_independent_1)
2005 Jul 08
1
explained deviance in multinom
Hi: I'm working with multinomial models with library nnet, and I'm trying to get the explained deviance (pseudo R^2) of my models. I am assuming that: pseudo R^2= 1 - dev(model) / dev (null) where dev(model) is the deviance for the fitted model and dev(null) is the deviance for the null model (with the intercept only). library(nnet) full.model<- multinom(cbind(factor1,
2001 May 07
1
"tree": Extracting deviance & Gaussian model of the node?
Hi I'm trying to use the "tree" package in R to predict intonation for a speech synthesiser and when I feed the feature vector into the tree, I want to get the predicted value and the deviance associated with that node. Q.1 --- I was hoping that the following command will return a tree object of the predicted values, but I get the following error:
2011 Apr 08
1
multinom() residual deviance
Running a binary logit model on the data df <- data.frame(y=sample(letters[1:3], 100, repl=T), x=rnorm(100)) reveals some residual deviance: summary(glm(y ~ ., data=df, family=binomial("logit"))) However, running a multinomial model on that data (multinom, nnet) reveals a residual deviance: summary(multinom(y ~ ., data=df)) On page 203, the MASS book says that "here the
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:
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
2017 Oct 05
0
fraction of null deviance explained by each node/variable in regression trees
I have used packages rpart, mvpart and tree for classification and regression trees. I want to calculate fraction of null deviance explained by each node and variable in the tree. For instance, at the first split, this would be (1 - (sum of residual deviance in each of the two leaves)/deviance at the root). In the subsequent splits, this formula is slightly different. There probably is a function
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
2012 Jan 13
1
deviance and variance - GAM models
Hi all, This is pretty basic but I am not an expert and I couldn't find anything in the forum or my statistics book about it. I was reading a paper and the authors were using both "explained deviance" and "explained variance" as synonyms. They were describing a GAM regression. Is that right? I performed an analysis in R to take a look to the output of GAM regression and I
2001 Mar 06
1
AIC bug?
Dear all, I am a little problem. In the help, AIC = - 2log L + k*edf. When the model is linear, the help said " -2log L is the deviance ". I have a model toto.lm with one output and three input where deviance(toto.lm) = 8.027 and edf =4. But AIC = -31.55. I don't understand why? Many thanks. Jean LEJEUNE Universit? de CAEN (France)
2000 Jul 24
1
Questions about deviance
I have experimented with the cheese data example from McCullagh&Nelder, page 175. With a proportional odds model they obtain a residual deviance of 20.31. Estimating the same model with polr(MASS) gives a residual deviance of 762.11 !, while using ordglm(gnlm) gives a deviance of 523.94. Can anybody explain these differences? The data frame with the data are: > cheese Cheese N
2010 Jun 02
1
Problems using gamlss to model zero-inflated and overdispersed count data: "the global deviance is increasing"
Dear all, I am using gamlss (Package gamlss version 4.0-0, R version 2.10.1, Windows XP Service Pack 3 on a HP EliteBook) to relate bird counts to habit variables. However, most models fail because “the global deviance is increasing” and I am not sure what causes this behaviour. The dataset consists of counts of birds (duck) and 5 habit variables measured in the field (n= 182). The dependent
2010 Jan 19
1
splitting a factor in an analysis of deviance table (negative binomial model)
Dears useRs, I have 2 factors, (for the sake of explanation - A and B), with 4 levels each. I've already fitted a negative binomial generalized linear model to my data, and now I need to split the factors in two distinct analysis of deviance table:  - A within B1, A within B2, A within B3 and A within B4  - B within A1, B within A2, B within A3 and B within A4 Here is a code that illustrates