I\'ve got some coefficients for a logit model set by a non-r user. I\'d like to import those coefficients into r and generate some goodness of fit estimates on the same data
Or, you can use something like this:
fit <- lm(Y ~ A + B + C, data=fakedata)
fit$coefficients <- c(1, 2, 3) # this would change the coefficients for A, B, C to 1, 2 and 3, respectively.
Y_hat_new <- predict(fit, new_fakedata) # this Y_hat_new will be calculated as your new predicted outcome given the new coefficients and/or new_fakedata.
The results should be the same if you follow the model.matrix route.