Tag Info

Accepted

How is a Poisson rate regression equal to a Poisson regression with corresponding offset term?

This also confused me. I thought, "what is the point of explicitly including an offset instead of just pretending that the response divided by the offset / exposure is the $y$ value?". You actually ...
• 342

Using glm() as substitute for simple chi square test

You can use an offset: glm with family="binomial" estimates parameters on the log-odds or logit scale, so $\beta_0=0$ ...
• 44.5k
Accepted

How to formulate the offset of a GLM

I don't know where you heard that a Poisson or negative binomial with an offset is preferable to a binomial model for a number of individuals surviving out of an initial number; I would normally ...
• 44.5k

Should I use an offset for my Poisson GLM?

There are several issues here: You need to use the observed counts as your response variable. You should not use the densities (g_den). If the observed counts ...
Accepted

Poisson xgboost with exposure

According to the answer in: https://stackoverflow.com/questions/34896004/xgboost-offset-exposure xgboost can handle offset term ...
• 276

Difference between: Offset and Weights?

Offset and weights are very different things. Offset is really a covariable included in a model with a fixed coefficient of $1$, which is not estimated. They are mostly used with poisson models to ...
• 81.4k

Offset in Logistic regression: what are the typical use cases?

I sometimes use an offset in a logistic regression model. The use case is where I already have a complex model, which needs to be re-estimated to cover some new data outside the realm of the original ...
• 1,604

Is it possible to use two offsets?

An offset is generally just a coefficient set to a specific value. To get more than one offset, in general you just need to combine the different variables in a way that is consistent to get that ...
• 16.2k

Should I use an offset for my Poisson GLM?

If you are going to model using the Poisson you have to have integer values for your response variable. You then have two options Use area or some other suitable denominator as an offset. This would ...
• 18.1k
Accepted

Can Weights and Offset lead to similar results in poisson regression?

(with your R code, you could replace "poisson" with "quasipoisson" to avoid all the warnings that get generated. Nothing else of import will change. See (*) below). Your reference use the term "...
• 81.4k
Accepted

Does offset always have to be on log scale with NB GLMM?

Normally, an offset is used when we are modelling some sort of rate data (e.g. deaths per 100,000, crashes per 100,000 etc). This is naturally modelled as some sort of ratio so have data in the form ...
• 38.1k

Should I use an offset for my Poisson GLM?

It looks like you divided the fish counts by the volume (or perhaps area) of water surveyed. In that case an offset is indeed appropriate, you should use the log of whatever you divided by. Perhaps <...
• 1,404

Can Weights and Offset lead to similar results in poisson regression?

Sorry not to simply add a comment above, but I do not have enough rep. The original claim - but modified a little - is infact correct. The following two models give exactly the same answer in R ...
• 241

Using glm() as substitute for simple chi square test

Look at confidence interval for parameters of your GLM: ...
• 4,091
Accepted

May "offsets" be used in mixed-effects poisson regression?

It's easier if you think of a statistical model as having a left hand side and a right hand side. The left hand side is concerned with what is being modelled. The right hand side is concerned with ...
• 20.6k

Does offset always have to be on log scale with NB GLMM?

This question is related to the choice of link function for your generalized linear model. McCullagh and Nelder say (page 31): The link function relates the linear predictor $\eta$ to the expected ...
• 96.2k

Pair-matched count regression in R with offset?

You should be able to do this with a mixed model with a count response (e.g. Poisson or negative binomial): you want the "standard" count-GLM-with-offset model with random variation in the ...
• 44.5k

why is XGBoost giving me seriously biased predictions with small nrounds?

First a few technical things: You can use an offset in xgboost for Poisson regression, by setting the base_margin value in the xgb.DMatrix object. You will not get the same results with your above ...
• 1,323

How do I fit models with predetermined covariates?

The answer by @t.f is the principled one, but can only be used as is for linear models: For glm's (generalized linear models, and other non-linear models needing iterative fitting methods) it cannot ...
• 81.4k
Accepted

Negative binomial for catch data with GAM

For things like this, the Tweedie (family of) distribution(s) is often used. The Tweedie distribution is a family of distributions and contains as special cases the Poisson and gamma distributions (...
Accepted

When are offsets useful in regressions involving literacy or linguistic data?

Offsets are mostly used for modeling ratios. So ask when ratios do occur in your field. For instance, if you are counting words, but some denominator of interest is not constant (time, some children ...
• 81.4k
Accepted

Difference between offset and exposure in Poisson Regression

Let's take a quick look at Wikipedia: For example, biologists may count the number of tree species in a forest: events would be tree observations, exposure would be unit area, and rate would be the ...
• 7,291
Accepted

How to interpret glm and ols with offset

You show four models, one of them is strange (the one marked OLS) so I will first discuss the three others. What is common is that a response variable (amount of ...
• 81.4k

Mixed Effect Model - Roadkill hotspot v. coldspot

Q1 - the purpose of an offset here would be to account for the fact that longer stretches of highway have more chance of having a roadkill. You are modelling log roadkill so you include log length as ...
• 18.1k

Poisson xgboost with exposure

Your code works just fine, you just need to increase the parameter nround to have the desired result. The Boosting models don't converge at the first iterations. ...
• 2,536
Accepted

Mixed Effect Model - Roadkill hotspot v. coldspot

Further to @mdewey's excellent answers, I wanted to add the following. For your question 2, if you use a statement like (1|Hwy/segment) in your model, the implications are that (i) you have multiple ...
• 20.6k
Accepted

Why does adding an offset change the coefficients in a Poisson regression?

Why are my estimated coefficients different? They should be different. You're no longer modeling count data. You're modeling rates. The offset is just like any other predictor in a linear model, ...
• 6,269
Accepted

Why use an offset variable as a predictor instead of just converting outcome to a rate?

The principal reason is to be able to use a Poisson likelihood function. The same reason would apply with a negative binomial likelihood function, or any other count likelihood when using a ...
• 81.4k
If you want a probabilistic inference on the location of $k$ (the change point), mcp is well suited for cases like this. It infers the parameters of change point ...
They are different models. Write $Y$ for the count and $T$ for the exposure time, and $X$ for predictors. One model says $$\log\,E\left[\frac{Y}{T}\mid X=x\right]=x\beta$$ The other says \log E[Y|X=...