I have a logistic regression model with the form:

logit(p) = alpha + X*beta

Where alpha is the intercept, X is the covariate matrix, and beta the corresponding coeffiecient.

I want to be able to reconstruct such a model where I estimate the intercept from a new dataset, but fix the coefficients in the model based on what has been reported in literature.

My questions are:

  1. Is such an approach possible?
  2. If so, could someone guide on a programmatic approach to do this?

If you are using R, then what you want is to use the offset argument to include a fixed, known constant in your linear predictor. See below for a simulated example. Type ?glm and look for the entry on offset for the explanation.

n = 100
x = rnorm(n)
alpha = 0.3; #true intercept
beta = 0.9; #true coefficient
y = rbinom(n, 1, plogis(alpha + beta * x));
#Here is your vanilla logistic regression
summary(glm(y  ~ x, family = "binomial"));
            Estimate Std. Error z value Pr(>|z|)    
(Intercept)   0.3131     0.2225   1.407 0.159468    
x             1.0938     0.2958   3.697 0.000218 ***
#Here is your logistic regression accounting for the known offset
summary(glm(y ~ 1, family = "binomial", offset = x * beta))
            Estimate Std. Error z value Pr(>|z|)
(Intercept)   0.3148     0.2171    1.45    0.147

Note: There are several reasons that the estimated coefficient from the literature would not be expected to have the same (true) value as yours. For example, your model would need to adjust for exactly the same set of covariates as the historical model (note, this means you cannot adjust for anything additional). Otherwise you would not expect the coefficient estimates to have the same true asymptotic value. See https://www.jstor.org/stable/pdf/1403444.pdf. Or your sampling populations might be different.

You may consider a middle ground between ignoring the historical literature entirely and assuming that it is exactly as reported with no statistical uncertainty, e.g. by placing a Bayesian prior on your coefficient, centered at the reported historical value. See https://www.kaggle.com/avehtari/bayesian-logistic-regression-with-rstanarm


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.