Hi all,
I am running regressions with many covariates, most of which remain the same
each time (control variables).  Instead of writing 30 demographic variables
every regression, is there a way I could call them all at once using a
variable called, perhaps "demog"?

I have tried:
> demog <- list(age1, age2, age3) but I get an error when I try to call a
list in a regression.

I also tried:
> demog <- cbind(age1, age2, age3) which allows me to run a regression, but
this is not practical because when I subset the original data set and run a
regression, this new matrix demog doesn't get subsetted as well, so the
variables are of differing length.

I'm thinking there is an easy way to do this.  Thanks for any help
guys/gals.

Justin
PhD student,
University of California, Irvine

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to