Questions tagged [deviance]

Deviance is twice the difference between the maximum achievable log likelihood and that attained under the fitted model.

Filter by
Sorted by
Tagged with
1
vote
1answer
26 views

Difference between binary and count data of same data on logistic regression in R

I confuse that the difference of Residuals deviance between binary and count data of the same data, by logistic regression in R. I'd like to know the way to calculate the both Residual deviance. ...
3
votes
1answer
29 views

ANOVA-like analysis for geometric distribution

I have a dataset (>10,000 samples total) that strongly appears to be geometrically distributed. For this dataset I have a way of partitioning that makes sense theoretically and I would like to know if ...
1
vote
1answer
32 views

Interpreting Residual and Null Deviance in GLM (using R)

I am using a glm function for regression analysis. And I have one question about interpreting residual / null deviance in GLM. First, here is the result. ...
0
votes
0answers
16 views

Why does DEVIANCE decrease when I delete a variable? Multinomial regression

I am comparing several nested models in a multinomial regression (multinom package Rsoftware). As far as I know, when we add a variable to a model the fitting is improved and should be reflected in a ...
1
vote
1answer
27 views

Meaning of “deviance” when using glmnet and family = “binomial”

When using glmnet in R with family = "binomial" you can set type.measure = "class" or ...
0
votes
0answers
20 views

Variance decompostion for logistic regression using deviances?

I have data on the proportion of methylated cytosines in a gene from 13 plant genotypes from replicate experiments at four sites. Each genotype is replicated at each site, so and I would like to ...
0
votes
1answer
13 views

anova.gam, significant test and 0 deviance

I have fitted a series of GAMs of increasing complexity, and compared with anova.gam. I get a significant p value (based on Chisq test) for a pair of models, even though the difference in deviance ...
0
votes
1answer
35 views

Explain the estimated residual variance in a Gamma mixed model, using glmer()

I am applying a generalized mix model, where the response has a gamma distribution, as below: ...
0
votes
0answers
16 views

What is considered as a good fit using the fraction deviance?

I am using the fraction deviance given by Hastie et. al (2015), $\mathcal{D}_{\lambda}^{2}=\frac{\mathcal{D}\mathrm{ev}_{\mathrm{null}}-\mathcal{D}\mathrm{ev}_{\lambda}}{\mathcal{D}\mathrm{ev}_{\...
2
votes
0answers
51 views

Deviance and MSE confusion (Boosting, Random Forests, Bagging)

I am following Hastie & Tibshiriani ISLR In Chapter 8 they introduce Bagging, Random Forests and Boosting. To compare each model they plot a curve of Test Error VS number of trees. Various ...
1
vote
1answer
37 views

Deviance in GLM with logit link

I try to understand how is calculated residual deviance after a glm with binomial distribution and logit link: I am not able to reproduce the value that is reported by R (I do not blame R; I am sure ...
1
vote
1answer
358 views

inverse gaussian glm residual deviance

I am currently modelling crash severity data with an inverse gaussian glm with a log link. I read that model residual deviance ~ $\chi^2_{n-p}$ Would there be an obvious reason why the residual ...
1
vote
1answer
52 views

Comparing residual deviance to null deviance in a logistic regression model: Is percentage reduction fallacious?

If I run a logistic regression model in R...for example summary(glm(data, formula = dichotomous.outcome.variable ~ age + hpv,family = binomial(link = "logit"))) ...
0
votes
0answers
25 views

Can AUC be constant while added predictors increase explained deviance of dependent variable?

I am trying to estimate the probabilities for the outcome of soccer matches for the home team (win or not win) based on pre-match variables (elo-rating, player ranks etc) and live statistics (...
1
vote
1answer
40 views

Calculating the 'deviance' in an Analysis of Deviance table for generalized linear models

The issue concerns question 3(b) of this paper. Specifically, I am trying to fill in the missing values for the 'Deviance' column of the ANOVA table. Using R, I find the missing corresponding to 'Day'...
0
votes
0answers
32 views

A better (top ranked) model has a much higher deviance in AIC model selection

I have the same number of parameters for the top model but a much higher deviance for that model than some of the lower-ranked models. I don't have any missing values for any of my variables, no ...
0
votes
0answers
40 views

Obtain expression for scaled deviance

I have the following density function and I'm trying to calculate scaled deviance: $$ f(y) = \sqrt{\lambda/2\pi y^3}\exp(-{{\lambda(y-\mu)^2}\over{2\mu^2y}}) $$ I converted this into the exponential ...
3
votes
1answer
100 views

How does one compare two nested quasibinomial GLMs?

Lets say I have two models: Model 1 and Model 2, both of which are used to fit a quasibinomial GLM on some 0/1 response data (that I believe has overdispersion, hence quasibinomial GLM instead of ...
0
votes
0answers
18 views

Is there a difference in finding p-value using likelihood ratio vs minimum deviance statistic?

I am trying to fit my data to a distribution and find the fit parameters and associated p-value. If I use the -2-log likelihood ratio, or G-test, vs the minimum deviance method, will I get different p-...
0
votes
0answers
26 views

Compartion of GLM models through log-likelihood, deviance and chi square

I'm studying GLM models in software R. I have a dataset with the follow distribution: age, sex, years of study (ys), road or hightway (usop), and claims. I'm adjusting my model to claimns where it is ...
0
votes
0answers
23 views

Deviance when y = 0

I am trying to compute deviance for the predictions of my dataset and I encounter quite a big problem here. Deviance is calculated as : $2 (\log(\mathrm{yTrue}) - \log(\mathrm{yPred}))$ where $\log$...
0
votes
0answers
9 views

Integral form of the deviance residual

Is there an integral form of the deviance residual? I've always seen the deviance residual written as $$ d_i = 2w_i\Big(y_i\big(\tilde{\theta}_i - \hat{\theta}_i\big) - \big(b(\tilde{\theta}_i) - b(\...
0
votes
1answer
97 views

Formula for deviance residuals for Poisson model with identity link function?

I understand the deviance residuals $r_D$ for a Poisson GLM with log link function are given by $r_D = \mu_{ij} \log(\mu_{ij}/\hat{\mu}_{ij}) + (\hat{\mu}_{ij} - \mu_{ij})$ I was wondering though ...
1
vote
0answers
171 views

Interpreting Pearson and Deviance residual graphs

Using a generalised linear model and predicted probabilities, I have been able to plot the Pearson residuals and Deviance residuals. I did this in order to have goodness of fit measures for the model. ...
1
vote
0answers
640 views

Goodness-of-fit glm: Pearson's residuals or deviance residuals?

I want to evaluate the goodness-of-fit (or badness-of-fit) of a negative binomial glm. However, even here within CV, I've seen multiple different approaches for doing so. Some use the the residual ...
2
votes
0answers
605 views

R Calculate Deviance Residuals in a Logistic Regression [closed]

I am working on a project, where I want to build a function which performs a logistic regression but does not use the glm() function. I ran in a little bit of difficulties, when it comes to calculate ...
0
votes
0answers
203 views

How can i interpret my residual deviance and degrees of freedom?

Ive made a binomial GLM in r and my resid. deviance and df are rather high; Null deviance: 4396.2 on 3207 degrees of freedom Residual deviance: 3679.4 on 3205 degrees of freedom (4346 ...
3
votes
1answer
754 views

Deviance residuals in Poisson GLM

I am learning the concept of residuals in modelling. I performed a Poisson GLM for a 3x3 contingency table and I got the summary of the model. My question is: the deviance residual from the in-built ...
4
votes
0answers
103 views

What are the pros and cons of different metrics for evaluating a logistic regression model?

In the data science world, I have always evaluated the performance of logistic regression models simply using ROC/AUC. However recently, I've read from some traditional statistics source about some ...
0
votes
1answer
803 views

Goodness of Fit for Poisson Regression using R

I am trying to determine how well a Poisson model fits my data using Residual Null and Saturated Deviances. The Y col is the # of pennies that landed in a cup and the cup column represents the size. ...
1
vote
1answer
355 views

GAM negative deviance explained for Poisson model fitted with REML

I am fitting time series of neuron spike data with a Poisson GAM. I am fitting it with the following call: ...
1
vote
1answer
85 views

Residual deviance and interactions in quasi-poisson model and negative binomial model?

My data was over-dispersed (dispersion coefficient over 5), so I have fitted both the quasi-poisson model and the negative binomial model. I notice that the regression coefficients are almost the same,...
0
votes
1answer
765 views

interpretation of deviance in logistic model

In logistic regression model for binary data, If the residual deviance(2*(likelihood of saturated model-likelihood of my model)) is 56.728 with df=117, what can I say about the lack of fit of the ...
2
votes
1answer
114 views

Diference in AIC value and significance of a factor

I am selecting a GLM model from a large data set based on an optimal AIC (Akaike information criterion ) for a set of candidate models. There about ~50 categorical factors in my model, each with ...
4
votes
2answers
453 views

Deviances in H2O

does anyone know how exactly the Deviances (Poisson, Gamma, Tweedie) are computed in H2O? I cannot find the functions. For interpretation purposes I would like to know the calculations. Thank you!
1
vote
0answers
65 views

Can I interpret Deviance as a sort of distance?

I've been studying some GLM theory, and I ran into deviance recently. Seems like the deviance has properties similar to a metric. Namely: $ D(y, y)=0$ Non-negativity $D(y, \mu) \geq 0$ I hesitate ...
4
votes
1answer
3k views

GAM (mgcv): AIC vs Deviance Explained

This is my first post & I'm fairly new to GAMs; apologies. I ran a series of 16 generalized additive negative binomial models (gam, family=nb, mgcv package) with increasing complexity that ...
2
votes
1answer
37 views

Should I include variables of no interest in the models when performing analysis of deviance on logistic regression with multiple predictors?

I have the logistic regression model $$\text{logit}(\pi_i)=\beta_0+\beta_1x_1+\beta_2x_2+\beta_3x_3+\beta_4x_4+\beta_5x_5$$ when $x_5=x_3\times x_4$. I set $H_0:\beta_3=\beta_4=\beta_5=0$ and the ...
2
votes
0answers
264 views

Obtaining Residual Deviance from cv.glmnet in R

I'm wondering how to obtain the residual deviance from my selected logistic regression model (once lambda has been selected) so that I can compare this model with another model I'll make from dropping ...
1
vote
0answers
82 views

How to intuitively explain the maths behind overdispersion?

I understand that overdispersion indicates extra, unexplained variation in the response than would be expected based on the statistical model of choice. And that the residual deviance is a measure of ...
1
vote
0answers
37 views

Parameter inference using deviance in normal linear model

I' am reading An Introduction to Generalized Linear Models. The authors introduce using deviance and discuss how it can be used directly as a goodness of fit statistic in logistic regression and ...
2
votes
1answer
1k views

Null & Residual Deviance in GLM in R

For a GLM in R, is it correct to interpret that Higher the difference between NULL & RESIDUAL deviance, better is your model? If not, then how do i know if my model is good or bad (for GLM - ...
0
votes
1answer
54 views

resources for understanding deviance

Can you please recommend a book or another resource for learning more about deviance, at roughly undergraduate level? I'm aware there are many specific questions and answers about deviance on this ...
5
votes
2answers
1k views

Diagnostics for General Linear Models

Pearson residuals follow normal distribution. We plot them against predicted values to see if the model is good. Why would we plot deviance residuals against predicted values? Deviance residuals don'...
2
votes
1answer
761 views

Interpret deviance residual plot in poisson regression

Below is a deviance residual plot obtained from a poisson regression. Since deviance residuals is a form of standardized residuals, we do expect it to have a constant variance. However, when there ...
4
votes
1answer
271 views

Need for zero-inflated poisson even though model fits data?

Have run a glm with Poisson-distributed errors on count data with 6 treatments and control. The output shows Residual deviance is 96.5 on 91 degrees of freedom, and result of: ...
3
votes
0answers
49 views

For an adequate fit of GLM models [duplicate]

I am trying to understand how to test for the goodness of fit in GLM regression. I am using an example from the book Davison and Hinkley (1997). In R, they fit the ...
2
votes
0answers
227 views

Pearson $\chi^2$ residuals vs deviance

In a GLM, how should I interpret the difference between using sum of the model's Pearson residuals model's Deviance to assess the fit of my model? Is the former more "flexible" since I can estimate ...
2
votes
0answers
1k views

How is deviance residuals calculated when the deviance is negative?

I was calculating the deviance from a regression model that I fitted following the same idea from here Deviance. For a likelihood $p(y|\theta)$, we define the deviance as $$D(\theta)=-2\log p(y|\...
3
votes
0answers
1k views

Different estimates for over dispersion using Pearson or Deviance statistics in Poisson model

I have a question about what is the best way to estimate the amount of over dispersion in a Poisson model. I am unclear what to use as a measure for over/under dispersion as there seems to be a lack ...