I am trying to calculate the effect size for a trait adjusted for my set of nuisance variables. My models looks like this:

```
Trait ~ Dx + Age + Sex

```

Where "Trait" is a continuous variable and "Dx" is a binary group membership variable. 

I'm using this basic formula to get an effect size estimate:

```
(mean(Trait[which(Dx==0)])-mean(Trait[which(Dx==1)]))/SDpooled

```

but I am mostly interested in the effect size after correcting for `Age` and `Sex`.

I calculated the marginal means (i.e. corrected for Age and Sex) for the `Trait` split by `Dx` group as shown here:  [on page 15, section 7.5 (PDF)](http://www.gmw.rug.nl/~boomsma/apstatdata/ANCOVA_R.pdf) 

But I want to know which standard deviation I should use. Is it required to also adjust the pooled standard deviation by the covariates? Is there some better way to get effect size estimates adjusted by a set of nuisance variables?