[R] regression with categorical nuisance variable

2011-02-28 Thread Jonathan DuBois
Hi, I am new to R, so I am unsure of the formula to set up this analysis. I would like to run a linear model with a continuous dependent variable (brain volume) and a continuous independent variable (age) while controlling for a categorical nuisance variable (gender). Age and brain volume are

Re: [R] regression with categorical nuisance variable

2011-02-28 Thread Ista Zahn
Hi Jon, Just enter it as a predictor in the model. You almost can't go wrong with this one. Usually I would caution you to convert your categorical variables to factors and make sure the contrasts are set how you want them, but in this case it doesn't matter because there are (I assume) only two

Re: [R] regression with categorical nuisance variable

2011-02-28 Thread Lao Meng
You may try analysis of covariance. But,as you sayThere are no gender differences in age ,then why not combine 2 gender's age and ignore the gender? 2011/3/1 Jonathan DuBois jonathan.m.dub...@gmail.com Hi, I am new to R, so I am unsure of the formula to set up this analysis. I would like to