multiple regression with continuous and binary regressors

Hi
How can I do a multiple regression if I have continuous and ordinal (binary) (eg. male and female) regressors.

Can I just add them like this lm(y~x1+x2+x3+x4, data=data)?

Depends on y, continuous, categorial, or binary?

If the independent variables are binary, and especially of they are 0 and 1, then yes, just use the formula you shared.

See for example: https://psychstat3.missouristate.edu/Documents/MultiBook3/Mlt07.htm

Then that should be the way to start

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

y is continuous in my data