# How to create a regression model object from intercept and coefficients values only (without the database) in R

I want to recreate a regression model based on what was given in a scientific paper. They gave intercept and coefficient terms.

I know how to create regression models in R, but is this possible to do without the original database?

I would use these models on my own database to perform model comparison and test their predictive capabilities.

The special case here is that I am mostly interested in logistic regression. But I guess this question is scalable to all types of regression models.

So in other words: how can we create regression model objects (e.g. glm) using only beta values.

• A working example of doing this with a logistic regression model, starting with the coefficients only, appears in the first block of code at stats.stackexchange.com/a/40609/919. An example with Poisson models is at stats.stackexchange.com/a/45789/919. Note that at a minimum you will also need somehow to specify the values of the independent variables. – whuber Aug 17 '16 at 18:41
• Related SO question that didn't get any answer : stackoverflow.com/questions/56703403/…. Building the P(Y=1) function from coefficients is one thing but embedding it in a standard R object is another. I have reached the conclusion that it is not something you want to achieve. A standard R model object will allow you to use a lot of functions but most of them will give you bad results because the glm model contain a lot more informations : Std. Error, z value, Pr(>|z|) for coefficients. – lcrmorin Aug 20 '19 at 13:38

• The question focuses on GLMs, for which this approach will not work. For linear regression your model is incomplete: you need to add random noise to y. Its variance is one more parameter of the model. – whuber Aug 17 '16 at 17:30