[R] Use glm coefficients for other datasets

Ben Bolker bbolker at gmail.com
Tue Feb 8 21:10:29 CET 2011


maxsilva <mmsilva3 <at> uc.cl> writes:
 
> I generated a glm logit model using a sample of a bigger set, and now I want
> to test the model with the bigger set. How can I do this? predict makes
> predictions only for a number of rows equal to the sample used. The question
> is, how can I use the coefficients of a glm with other sets than the one
> used to generate those coefficients?
> 

  Take a closer look at ?predict.glm, especially the 'newdata' argument ...



More information about the R-help mailing list