1
$\begingroup$

I'm trying to understand the theory behind calculating a two sample t-test with one or more covariates. Specifically three cases are interesting:

  1. two continuous covariates
  2. two categorical covariates
  3. one continuous covariate like age and one categorical covariate like gender

Moreover, the issue of centering covariates in these cases is something I struggle to grasp.

I assume this can be done in the context of the general linear model, like normal t-tests and ANOVA, but I couldn't find much online about the equations or implementation, so I was hoping someone could give me some hints where to read up on this or explain it to me.

Any help appreciated!

$\endgroup$
  • 2
    $\begingroup$ All of them are just straight up regressions (ordinary multiple regression), where the categorical covariates are coded with indicator variables in whatever your favourite contrast-coding is. I don't understand why every combination of discrete and continuous predictor are still taught anywhere as distinct -- it's all just the same calculations. Fifty years ago it made sense to treat them differently because in a balanced experiment with categorical predictors there were great computational savings to be had -- which mattered a lot when you were working by hand. $\endgroup$ – Glen_b Mar 10 '16 at 0:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.