These are examples of multivariate statistics. Frequencies for Three or More Categorical Variablesįor three or more categorical variables, frequencies will tell you how many observations fall in each combination of the variables and give you a sense of their relationships just like they did with two categorical variables. These are also examples of bivariate statistics. Of then the question of interest is whether the distribution of the quantitative variable is different for different categories. Summary Statistics for One Quantitative Variable over One Categorical Variableįor a quantitative variable and a categorical variable, the mean value of the quantitative variable for those observations that fall in each category of the categorical variable can give you a sense of how the two variables are related. Tables of frequencies for two variables are often called two-way tables, contingency tables, or crosstabs. These are examples of bivariate statistics, or statistics that describe the joint distribution of the two variables. Frequencies for Two Categorical Variablesįor two categorical variables, frequencies tell you how many observations fall in each combination of the two categorical variables (like black women or hispanic men) and can give you a sense of the relationship between the two variables. Means are often called averages, and variance is just the standard deviation squared. Quantitative variables are often called continuous variables. However, the median and percentiles often give you a better sense of how the variable is distributed, especially for variables that are not symmetric (like income, which often has a few very high values). Summary Statistics for a Single Quantitative Variableįor a variable that describes quantities (like income) the mean tells you what the expected value of the variable is, and the standard deviation tells you how much it varies. Frequency tables for a single variable are sometimes called one-way tables. Indicator variables (also called binary or dummy variables) are just categorical variables with two categories. These are examples of univariate statistics, or statistics that describe a single variable.Ĭategorical variables are also sometimes called factor variables. Topics Covered in this Section Frequencies for a Single Categorical Variableįor a variable that describes categories (like sex or race) rather than quantities (like income) frequencies tell you how many observations are in each category. If you are new to Stata we strongly recommend reading all the articles in the Stata Basics section.ĭescriptive statistics give you a basic understanding one or more variables and how they relate to each other. This article is part of the Stata for Students series.
For additional options on displaying summary statistics and customizing table layout, type. The option r2 will display the R-squared statistic for each model. The b() and se() options indicate that the point estimates and standard errors, respectively, should be rounded to the second decimal place. The extension of the file determines the file format, in this case rtf. Specify the names of the stored estimates, model1 and model2, and the directory where the table of results should be saved. esttab model1 model2 using C:\temp\results.rtf, b(2) se(2) r2 To save the two models in a single table in an external file, use the. Immediately afterĮstimating each model, store the estimates in Stata memory with the Is estimated with robust clustered errors.
Suppose you wish to compare two regression models, only one of which
#Collapse stata install
Package, which you can install from the Stata packages repository.
Stata can store estimates from multiple models, save allĮstimates in a single table, and export the table to an external file, Information here may no longer be accurate, and links may no longer be available or reliable. This content has been archived, and is no longer maintained by Indiana University.