0
$\begingroup$

My independent variables include continuous (Age, weight), binary (Smokes or not) and count data (number of visits to doctors 0-5), while the dependent variable is continuous. Should I use dummy variables for all the binary and the count variables to fit a linear regression? What are the pros and cons?

In another scenario, the dependent variable is binary with the same type of mixed (continuous, binary, count) variables. Should I use dummy variables just like linear regression?

$\endgroup$
1
  • $\begingroup$ Which application are you using to analyze your data? $\endgroup$ Commented Jan 20, 2023 at 5:30

1 Answer 1

0
$\begingroup$

Dummy variables can be used for you binary variable (i.e. smokes or not). Your specific count variables (i.e. number of visits to doctor) and continuous variables (i.e. age, weight) are not appropriate for use with dummy variables, which are usually dichotomous/binary in nature. It does not make sense to have a dummy variable for number of visits to doctor.

If you had a categorical variable as one of your covariates, such as patient's hair color, you can code a dummy variable for each hair color. That is, brown = 1 if patient has brown hair, else = 0; black = 1 if patient has black hair, else = 0. There is really no difference between this approach and including the categorical variable as is in your regression. The same inference (i.e. difference between the categories) can still be drawn using the categorical variable, and is usually more efficient.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.