[R] turn regression coefficients into matrix or...

Marc Schwartz marc_schwartz at comcast.net
Tue Mar 13 03:06:39 CET 2007


On Mon, 2007-03-12 at 19:58 -0600, Jun Xu wrote:
> I don't have much experience with r. What I am trying to do is to turn
> regression coefficients (after I run a lm or glm model) into some matrix
> such that I can do some post-estimation calculation, for example predicted
> probabilities in glm model, etc.. Or, is there any function in r that I can
> use to do something along that line? thanks.

Presuming that you have a lm() or glm() model object, see:

  ?model.matrix

  ?model.frame

  ?predict.lm

  ?predict.glm

HTH,

Marc Schwartz



More information about the R-help mailing list