1/3/2024 0 Comments Stata regress by group![]() To provide an example, let us suppose our sample of individuals have five levels of wealth poorest, poorer, middle, richer and richest. We are interested in understanding the relation between total number of children born in a family and their wealth level. So the rule is to either drop the intercept term and include a dummy for each category, or keep the intercept and exclude the dummy for any one category. Including as many dummy variables as the number of categories along with the intercept term in a regression leads to the problem of the “ Dummy Variable Trap”. For example, if the categorical variable ‘sex’ can take only 2 values, viz., male and female, then only one dummy variable for sex should be included in the regression to avoid the problem of muticollinearity. First, one must be careful to include one less dummy variable than the total number of categories of the explanatory variable. However, one should be cautious about how to include these dummy explanatory variables and what are the interpretations of the estimated regression coefficients for these dummies. Dummy Explanatory Variable: When one or more of the explanatory variables is a dummy variable but the dependent variable is not a dummy, the OLS framework is still valid. Categorical variables can not only capture situations where there is no inherent ordering of the options (like the above two examples, or say male versus female, etc.) but also when the values carry ordinal meaning (e.g., how happy are you at the moment on an integer scale of 1 to 5 with 5 being the happiest, or how democratic is a country’s politics on an integer scale of 1 to 10 with 10 being the perfect democracy).Ī. Similarly, deciding which continent to spend your next vacation in can only take certain specific values: Asia, Africa, Europe, South America, etc. For example, choosing between investing or not in a company’s share is a decision variable that can only take two values: YES or NO. Dummy variables or categorical variables arise quite often in real world data.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |