1

I usually use R to make my own statistical models based on data that I have.

However, I have recently read about a logistic regression model in a scientific publication and I want to replicate this model to make predictions on some of my own data, which includes the same variables.

Is there a way to "declare" a model in R, based on the coefficients published in the paper?

Hbrandi
  • 171
  • 2
  • 14
  • 1
    You can use the `offset` argument of `glm()`. See here: https://stats.stackexchange.com/questions/82411/how-to-fix-one-coefficient-and-fit-others-using-regression – LAP Mar 20 '19 at 12:51
  • 3
    to replicate an estimation you must have some data. Could you post a sample of this data? – DJJ Mar 20 '19 at 12:52
  • Hi, adding to the input from @DJJ , there are several ways to provide data, probably adding the output of `dput()` or `dput(head())` to your question is sufficient. Avoid adding code or alphanumeric output as images. Consider how to make a good example: https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example and see how you can change your question accordingly. – heck1 Mar 20 '19 at 13:12
  • I think it is a much better idea to get the data and run the model yourself. For one thing, IF you're data has the same characteristics of the original data, you can then use the predict method to get the results on the new data. However, you can certainly look up the formula for a logistic regression and recreate the result yourself. – meh Mar 20 '19 at 13:19
  • Right now this is way too broad—we don't know anything about the data, or the model, or the paper, or the coefficients you're looking at in the paper. – camille Mar 20 '19 at 14:19

0 Answers0