Categorical variable as independent variable [closed]

I am using the variable education level as a control variable and this variable consists of 7 education levels (1-7). Now I can't use it as it is converted in the data. My teacher has messaged me that I have to use education fixed effects by computing the variable into a binary variable for each education level, however, I am not sure how to do this in stata.

Does anyone have tips on how to covert this variable?

you do not need to that. simply type

regress yvar xvar i.educvar


where y is your dependent variable, x are all other independent variables, and educvar is your education variable in categories.

If you have stata 12 or above, it will automatically create the binary variables in the background.