We (wisely) told Stata to generate the new variable agecat as a byte thus conserving memory. We can create the same result with one command using the recode()
by creating new variables and in the second syntax (xi: any stata command)
We (wisely) told Stata to generate the new variable agecat as a byte thus conserving memory. We can create the same result with one command using the recode()
If you have two or more categorical variables you may want to create one composite categorical variable that can take on all the possible joint values.
THE GENERATE COMMAND. CREATING DUMMY VARIABLES. REGRESSIONS. LINEAR REGRESSION. PROBIT MODELS. WRITING A PROGRAM: DO-FILES. RECORDING OUTPUT: LOG FILES.
21 sept. 1983 The term “dummy variable” for a variable encoded with values of 0 and 1 seems to have arisen around 1950 in statistical science. Freedman (2009 ...
14 sept. 2011 Stata's regress command runs a simple OLS regression ... To create dummy variables based on categories of another variable use the tabulate ...
xi [ prefix(string) noomit ] : any stata command varlist with terms . creates dummies for categorical variables varname1 and varname2:.
(interaction expansion) to automatically generate dummy variables. 21. NOTE: In Stata 11 you do not need. “xi:” when adding dummy variables.
Three way crosstabs (with average of a fourth variable). ?. Creating dummies. ?. Graphs. ? Scatterplot. ? Histograms. ? Catplot (for categorical data).