Questions tagged [offset]

A variable with a fixed coefficient of 1. Offsets are commonly used in Poisson regression to allow the modeling of rates instead of counts.

Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

GLM in R: How to include a predictor with a pre-determined/fixed coefficient, without using offset? [closed]

On the RHS of the GLM formula in R, I want to include a predictor which has a fixed coefficient (if it's relevant, I want the coefficient fixed at 1). In other words, the coefficient for the said ...
user avatar
0 votes
0 answers
28 views

negative binomial glm: issues with model diagnostics when using offset term

I'm trying to model count data using a negative binomial glm with an offset in R and am having some issues with getting the model to fit properly when I use an offset term. Here is a reproducible ...
user avatar
  • 1
2 votes
1 answer
44 views

In Poisson models with an offset, should performance metrics (such as deviance) be calculated in terms of raw counts or counts per exposure?

For context, I need some metrics that can compare a standard Poisson regression (with population offset) to a random forest regressor with Poisson criterion. The test predictions for both methods are ...
user avatar
  • 101
0 votes
1 answer
31 views

How to incorporate offset variable in coxphf()?

...
user avatar
  • 1
1 vote
1 answer
38 views

Is "vanilla" random forest regression appropriate when dependent variable is a rate (i.e. per 100 people)?

To add a little more context, I am working with a dataset from which I want to predict the population-normalized count of emergency department visits on county level, with 50+ independent variables. ...
user avatar
  • 101
0 votes
0 answers
41 views

Offset or weight in binomial GLM - account for distance to road on animal sightings

I am building a species distribution model for an animal, using data collected by community members when they sight this animal. My first step is to fit a generalised linear model with family binomial ...
user avatar
1 vote
1 answer
33 views

Accounting for sampling effort of independent variables in a regression analysis

I would like the test whether the frequency of a cellular structure on a histology section is associated with (binary) patient outcomes. This would be a simple logistic regression of i.e. ...
user avatar
  • 1,100
1 vote
1 answer
252 views

Offset in Poisson GLM with log link function where I have values equal to zero

I am trying to build a GLM model (poisson family) using python statsmodels package on train data. The data I have contains categorical values as exogenous variables and numerical values for my target (...
user avatar
2 votes
1 answer
50 views

Does a constant offset term meaningfully influence Poisson GLM?

If my offset term is a constant value, does this change the outcome of a Poisson GLM regression? I have survey count data that we summarize as a rate (Counts/Area-Surveyed). In this case, transect ...
user avatar
1 vote
1 answer
36 views

Incorporate Weights/Offsets with Nonparametric Models

I am modeling pure premium in R. I have read that pure premiums are usually modeled using a Tweedie distribution (glm). There is generally an offset or weight added to the model, such as an exposure. ...
user avatar
  • 185
0 votes
1 answer
126 views

Can offset variables be used in binomial logistic regression models?

When I look up what exactly the offset is doing, I only see references to poisson or negative binomial models. Neither of those analyses work for me because I do not want to predict counts. I want to ...
user avatar
  • 11
1 vote
0 answers
30 views

Inclusion of values that can only be zero in Poisson glmer

I have carried out a biological experiment in which the dependent variable is female propensity to mating, measured as the number of times a female animal accepts a mating attempt from a male. I have ...
user avatar
  • 21
5 votes
1 answer
67 views

Pair-matched count regression in R with offset?

I need to conduct a pair-matched count regression in R. Specifically, my data looks as follows: ID Exposure Occurrence Area 1 0 7 50 1 1 5 55 2 0 6 70 2 1 8 74 3 0 4 45 3 1 9 62 I need the ...
user avatar
0 votes
1 answer
87 views

When to use offset in binomial glm

I am trying to model the number of successes in data where the number of trials is not fixed. I am trying to fit a binomial generalised mixed effects model, with the number of trials as an 'offset' ...
user avatar
  • 21
0 votes
0 answers
13 views

How to appropriately define counts for a Poisson mixed effects regression

Suppose I have $I$ individuals each contributing count data $X_i \sim \text{Poisson}(\exp(\beta_0 + C_i^\intercal \beta))$. Let $Y_{i1}, \cdots, Y_{i12}$ represent the counts recorded in months $1, \...
user avatar
  • 471
0 votes
1 answer
57 views

How to include population size in difference-in-differences analysis

I'm trying to estimate the effect of a certain policy intervention on the count of violent incidents in communities which received that intervention, compared to communities which didn't. I'm trying ...
user avatar
  • 15
0 votes
0 answers
19 views

How to make a stratification in a penalized logistic model with the penalized function?

I use the R package "penalized" and I want to fit a stratified penalized logistic regression model. In the package vignettes, I found: It is possible to include an offset term in the model. ...
user avatar
1 vote
0 answers
307 views

Poisson regression with offset - help with fit and visualization

My goal is to understand the relationship between the number of worms found in a plot of land and the percent silt that makes up the soil. The plots of land have been investigated to different extents ...
user avatar
1 vote
0 answers
23 views

using per capita or raw counts for epidemiological regression analysis

I have two datasets. To simplify, they look something like this: ...
user avatar
5 votes
2 answers
505 views

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

I'm using a negative binomial GLMM with R package lme4 to detect differences in time mothers spend feeding before and after birth (inf_cat). ...
user avatar
  • 27
1 vote
1 answer
191 views

Choosing the best family and link function for a GLM

I'm new to GLMs and I need to do several GLM using a kilometric abundance index (non integer, but calculated from a count) as the dependent variable and several habitat traits as the independent ones. ...
user avatar
  • 11
0 votes
0 answers
96 views

How to plot a poisson model with offset?

I fitted a glm poisson with an offset term (in R) to my data and found a relationship between predictor and response variable. Now I would like to create a scatterplot with my original data in ...
user avatar
1 vote
1 answer
37 views

Do offsets consume degrees of freedom?

In a model with some offset variables (variables with pre-determined regression coefficients), do these variables consume degrees of freedom, with regard of e.g. information criteria? Pro: You can ...
user avatar
1 vote
0 answers
31 views

GLMM: How to impose a specific parameter (intercept or slope) for the model?

Good afternoon, I would like to know if it’s possible and how to specify parameters in a GLMM. Let’s take the example of a GLMM with random intercepts. In the following equation, the vector of fixed ...
user avatar
0 votes
0 answers
36 views

AIC difference after adding offset in negative binomial in R

I'm quite confused about how R calculate likelihood/AIC in glm.nb after adding the offset. In this example, the regression coefficients are the same but the AICs ...
user avatar
1 vote
0 answers
33 views

Modelling catch rates: difference between Gamma and poisson distribution

I am confused about the difference between modelling counts (i.e. catch) using a poisson distribution with an offset (i.e. effort) and modelling catch per unit effort using a gamma(link=log) ...
user avatar
2 votes
1 answer
57 views

Can I partial out covariates with true coefficients known in Logit?

Suppose the model is $$ \ln(\frac{P_{ij}}{1-P_{ij}}) = X_{ij}\beta_0 + A_i + A_j + \epsilon_{ij}, $$ The unit of observation is at $ij$ level, and $A_i$ and $A_j$ are coefficients on the dummy for ...
user avatar
3 votes
1 answer
104 views

Understanding offsets for continuous variables

I'm currently trying to write a linear model with data from some behavioural experiments with termites. I started to read Ben Bolker's "Ecological Models and Data in R", which has been a ...
user avatar
  • 101
0 votes
0 answers
107 views

Modelling overdispersed rate data using a negative-binomial distribution

A quick overview of the analysis I'm wanting to do: I am wanting to analyze the relationship between habitat factors and the capture of my research species over a network of traps, in order to be able ...
user avatar
0 votes
1 answer
143 views

Can weights be used in place of offset in Tweedie model

I have seen evidence that Poisson regression can be run with either offsets or weights for time and both give the same results. However, I have noticed that the same is not true for Tweedie. I have ...
user avatar
0 votes
1 answer
102 views

mvabund package can't handle offsets?

I have a set of fish data from a lake. I am trying to see whether the local fish community differs depending on the location within the lake (North, East, West), the presence of an island at the ...
user avatar
  • 147
1 vote
1 answer
137 views

How to handle a constant parameter in a Poisson regression?

I have a Poisson regression model with rate, $\lambda$, defined as $ln (\lambda) = \alpha + \beta + \gamma$. Here $\alpha$ and $\beta$ change and $\gamma$ is 0.5 for each observation. $\gamma$ is ...
user avatar
3 votes
0 answers
39 views

Variance of negative binomial given an offset

Given observations $Y_1, \ldots, Y_n$ from the negative binomial distribution, $NB(\mu, \theta)$, and assume that we model the mean with a GAM: $$\log E(Y_i) = \log \mu_i = \log t_i + f(x_i),$$ where $...
user avatar
  • 550
1 vote
0 answers
41 views

Interpretation of quasi poisson regression with offset

I am trying to find out how to correctly interpret the coefficients for a Poisson regression. My main outcome of interest is the number of antibiotics prescribed (count) or the rate of antibiotics ...
user avatar
1 vote
0 answers
181 views

Incorporate offset into mgcv GAM smoothing

When developing mortality models, I often have the following problem: I have a prior/base rate table and mortality experience data from a population of interest, and I need to develop factors on top ...
user avatar
  • 10.1k
2 votes
0 answers
83 views

How to adjust for exposure time in a binomial model

I have several binomial (logit) models that predict the probability of various binary outcomes (e.g., incurring any costs for health care treatment, having a chronic disease). My case and control ...
user avatar
1 vote
1 answer
104 views

Best GLM to model a random variable that represents a count over a non-fixed interval of time

The random variable on which I am seeking to fit a GLM is the number of times a patient has a blood glucose level measurement above a specified threshold before they are escalated onto a stronger ...
user avatar
1 vote
0 answers
23 views

Simple poisson regression for a death rate [duplicate]

I am trying to regress the death rate for a particular cause of death for 25-30 year olds. My dependent variable of interest is the crude rate, i.e., y = number of deaths of 25-30 year olds/number of ...
user avatar
  • 405
0 votes
1 answer
82 views

Why do results differ with and without offset in Poisson regression?

I have a dataset with counts of preterm births for five years by county. I am running analyses to see whether contaminant water concentration levels for each county for each year predict preterm ...
user avatar
2 votes
0 answers
324 views

Offset vs weigths in GLM

I was wondering from a technical perspective what approach I should follow in this modelling problem I have. I have a target variable Y which is a continuous random ...
user avatar
4 votes
1 answer
401 views

How does the interpretation of a binomial-logit GLM change when an offset term is included?

My GLM is as follows: ...
user avatar
0 votes
2 answers
696 views

Post hoc analysis after GLM model using count data and offset

I have ecological count data across 15 sampling sites. The count data has a Poisson distribution and I have included an offset for "area_searched", which is the m^2 of each sampling site as ...
user avatar
2 votes
0 answers
46 views

Using Offset in Binomial/Logit GLM for Exposure Years? [duplicate]

I am building a GLM Model that predicts whether there will be a claim in a certain policy or not. So target variable is either 0 or 1, so my choice of GLM was Binomial, and link function was Logit. In ...
user avatar
0 votes
0 answers
33 views

How to include offsets of 2 variable in one linear model

I've been conducting some research on recruitment of fish and fish survival in estuaries. I'm analysing recruitment and mortality against environmental variables such as temperature and river flow. ...
user avatar
2 votes
2 answers
277 views

How do you fix one slope coefficient in an interaction term?

hoping someone can help me with what (on the face of it) appears to be a relatively simple problem but which I can't current code out. Basically, I would like to fit a GLM in R with a simple two-way ...
user avatar
1 vote
1 answer
46 views

Finding the difference between a normally distributed random number and randn with an offset using Kolmogorov-Smirnov test and Chi-square test

A normally disturbed random number is generated using randn function in Python. The KS test and Chi-square test is performed to check if the generated numbers belong to a Gaussian (zero mean, unit ...
user avatar
0 votes
1 answer
185 views

Multicollinearity for Offset Variable?

In a Poisson model, do we need to check for multicollinearity between the offset variable and other covariates? For example, if I offset by population size, would it be problematic to include ...
user avatar
2 votes
1 answer
491 views

log-offset in rpart regression tree

I have understood that one commonly adds log(exposure) as an offset in the formula for GLMs, when dealing with poisson distributed rate data. I am dealing with insurance claim data where I want to ...
user avatar
  • 65
1 vote
0 answers
230 views

Ecological count data and offset terms

Problem: When using GAMs to model ecological count data (e.g. fish counts) using Poisson or negative-binomial distributions, the response variable is raw counts and the offset (e.g. log-transformed ...
user avatar
0 votes
1 answer
236 views

Zero offset values, glmm poisson/negative binomial distribution with

I have a data set that consists of video observations of carpenter bee nests under three treatments: a control, mothers removed and mothers and worker removed. I have counts of twenty behaviours as ...
user avatar