I am very new to stata and not really sure what I'm doing, I'm just trying to get some regression output for a university assignment.
The data I am using can be found here https://www.datafirst.uct.ac.za/data...hp/catalog/570
"Get microdata" will prompt the download.
The variables I would like to use are named: "w4_a_em1pay" as the dependent variable (monthly income) and "w4_a_em1prod_c" as the independent (economic sector).
w4_a_em1prod_c is a categorical variable with no numerical obs. as far as I know. There are 26000+ observations and I can't check all of them.
I am using the following input:
regress w4_a_em1pay i.w4_a_em1prod_c
And getting the following output:
w4_a_em1prod_c: factor variables may not contain negative values
Is there a fix for this? Can I search for negative values in the variable to remove them? Or somehow ignore the observations with negative values etc.
The data I am using can be found here https://www.datafirst.uct.ac.za/data...hp/catalog/570
"Get microdata" will prompt the download.
The variables I would like to use are named: "w4_a_em1pay" as the dependent variable (monthly income) and "w4_a_em1prod_c" as the independent (economic sector).
w4_a_em1prod_c is a categorical variable with no numerical obs. as far as I know. There are 26000+ observations and I can't check all of them.
I am using the following input:
regress w4_a_em1pay i.w4_a_em1prod_c
And getting the following output:
w4_a_em1prod_c: factor variables may not contain negative values
Is there a fix for this? Can I search for negative values in the variable to remove them? Or somehow ignore the observations with negative values etc.
Comment