I have data on hair growth per month (continuous outcome variable) and want to compare two groups of subjects (categorical predictor: high and low intake of a compound) and include confounders into the analysis.
To just compare the two groups, I believe I can use a two-sample t-test or a one-way anova. However, there are a lot of confounders which can affect hair growth, such as age, nutrition, smoking, etc. What test can I use to include these into my analysis? I know that for two continuous variables you can use a multiple linear regression model, however what would you choose for a continuous outcome variable and a categorical predictor variable? The confounders are a mix of continuous and categorical variables.
In similar posts I have seen people suggest linear regression and two-way anova. However I thought that linear regression was only for continuous variables and a two-way anova only takes two independent variables into account? Another poster said something about 'removing the effects manually'. I wonder what that actually means (unfortunately there were no answers to the post).
I am quite new to statistics, so explanations to any answers would be greatly appreciated.