Assume I have a
y-matrix (input and outcome) as follows:
x: facility gender ... | y: length_of_stay A M ... | 3 B F ... | 12 A F ... | 4 C M ... | 3 C F ... | 6 A M ... | 9
y has only one dimension.
x has many dimensions (
gender and others not of interest).
gender are categorical.
y are arbitrary length, but the same length. Assume that I intend to do analysis on dimensions other than
gender, and assume that
gender are confounding variables.
How do I adjust
length_of_stay so that it is controlled for
I believe that the answer is to do multiple regression between
length of stay. However, I'm fuzzy on the details of creating the dummy variables (how do I avoid the dummy variable trap when I have an intercept at the origin, and how do I avoid the dummy variable trap when I don't have an intercept at the origin?). I'm also fuzzy on how to use the betas after completing multiple regression to adjust