Skip to content
Prev 131548 / 398506 Next

Adding a subset to a glm messes up factors?

First, 'subset' is an argument to glm(), but for some reason you did not 
use it.  Your subject line is quite misleading, and had it been the more 
accurate

 	Adding a 'data' argument to glm messes up factors?

you might have realised the problem.

Second, your models are fitted to different datasets: the first to objects 
in your workspace, and the second to columns of data.all. Since you have 
not (as we asked) given a reproducible example we cannot know what those 
differences are, but differences in the datasets will be the key.

Third, the best way to fit linear models is lm(), not 
glm(family=gaussian).
On Fri, 7 Dec 2007, Muri Soares wrote:

            
PLEASE do!