[R] adding variable

Martin Wegmann mailinglist2_wegmann at web.de
Tue Nov 18 19:07:00 CET 2003


Hello, 

I have count data of animals (here y, y1, y2...) and env. variables (x, x1, 
x2 ,....).

I used a glm 

glm(y~x1+x2+x3....)

glm(y1~x1+x2+x3....)

and now I would like to add the count data of other species to investigate if 
they might have a bigger impact than the env. variables:

#x? are the selected var from the first glm run

glm(y~x?+x?+y1)

glm(y~x?+x?+x?+y2)

....

I wonder if there is a more elegant method to do this than adding (and 
removing) each y by hand. 

thanks in advance, cheers Martin




More information about the R-help mailing list