Linear regression with a categorical covariate
Hi,
I'm new to JASP. For a course I'm teaching, I want students to run a simple linear regression on a continuous dependent variable, in which one of the covariates is categorical - say an eight-category variable capturing respondents' ethnicity.
I can't seem to figure out how to get regression estimates for each category in relation to the reference category, as one would, say in Stata using an i.varname to indicate the variable i categorical. It makes no sense to get an overall estimate for ethnicity, as if it was continuous.
Any help on how to do this in JASP?
Thanks in advance.
Tom
Comments
Hi Tom,
I've asked some team members to respond...
Cheers,
E.J.
Hi Tom,
I suspect there is a bug in the frequentist linear regression analysis, because this particular analysis does not allow the specification of categorical predictors (and in this case just mistakenly treats it as continuous). If you want to conduct the analysis you describe, I think it's better to either run a mixed model or an ANCOVA, although these analyses also do not (yet) output regression coefficients for each group. I agree that this would be a great addition to those analyses, and I will request this feature with the responsible programmers.
Kind regards,
Johnny