Adding nuisance regressors to lme() (R package 'multilevel') I've been trying to figure out how to add a covariate of no interest to some of my models using the lme() function from 'multilevel', but have had little succes. In general, these are longitudinal data with some brain measure as the dependent variable, and we are interested in the effects that various demographic characteristics (presence/absence of hypertension, particular genotype, etc.) have on slope and intercept.
For example, we might model fractional anisotropy thus:
ILF_FUll <- lme(ILF_FA ~ time + AGE_AT_SCAN + time:AGE_AT_SCAN +
                           HBP_STATUS + time:HBP_STATUS + APOE + time:APOE + 
                           HBP_STATUS:APOE + HBP_STATUS:APOE:time, 
                     random=~ time|subject, data=allwaves_noNA, control = lmeControl(msVerbose=T,maxIter = 200, msMaxIter = 200, niterEM = 50, msMaxEval = 400,opt='optim'))

But what if I also want to remove any effects of sex? I had thought that putting such a term first in the model might account for the variance it contributes, but is that the right way to control for nuisance covariates? 
 A: You might want to consult the formula documentation in R. Using the * additionally adjusts for first order effects. time * APOE is equivalent to time + APOE + time:APOE. Your model could be greatly simplified using `time*( AGE_AT_SCAN + (HBP_STATUS + APOE)^2).
f1 <- ~ time*( AGE_AT_SCAN + (HBP_STATUS + APOE)^2)
f2 <- ~ time + AGE_AT_SCAN + time:AGE_AT_SCAN +
  HBP_STATUS + time:HBP_STATUS + APOE + time:APOE + 
  HBP_STATUS:APOE + HBP_STATUS:APOE:time

match(attr(terms(f1), 'term.labels'), attr(terms(f2), 'term.labels'))

gives me
> match(attr(terms(f1), 'term.labels'), attr(terms(f2), 'term.labels'))
[1] 1 2 3 4 8 5 6 7 9

Showing a 1:1 correspondence with a more concise formula.
I look at a regression model as being capable of answering one question and one question only. In looking at this, I presume your line of inquiry concerns mainly the effect of hypertension on these brain measures, as microvascular injury is certainly an important contributor to later cognitive decline and MRI abnormalities. Depending on how APOE is coded, it may be a precision variable, e4 carriers have different MRI outcomes so it should be coded binary in that regard, even though e2 carriers have different cardiac outcomes.
Adjustment and stratification are two methods for "controlling" for sex. I would not claim that it "removes any effects of sex". The correct approach will be one that is dictated by the scientific investigation. The easiest approach is certainly adjusting for a single level additive effect of sex. Sex is a between-cluster confounder since it is causal of HBP and presumably also of neurocognitive outcomes. You could further refine the hypothesis by inspecting the possibility of interaction between sex and HBP by calculating an interaction term.
The option of fitting stratified models is also available. Since sex is a between cluster confounder, you can create stratified models by either calculating interactions between sex and all fixed effects (in which random slopes and random intercepts are jointly estimated in males/females using 2 random effects), or you can fit entirely separate models (differing insofar as random slopes and random intercepts are also allowed to differ between males and females giving rise to 4 random effects).
