statacommands - tab var1 or tab var1 var2 For a single...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Useful Stata Commands Command Example of syntax What it does use “use /stats/cpsworkers.dta” Loads a Stata database. help “help command” Describes what the command does, how to use it, options available with the command, and examples of its use. browse “browse” Displays the database as a spreadsheet ( read - only ) . edit “edit” Displays the database and allows you to change variables ( Also handy when copying and pasting an Excel file into Stata ) . rename “ren oldname newname” Changes the variable name. describe “desc var1” or “desc var1 var2 var3” ( or “desc” alone for the entire database ) Displays the type of the variable ( s ) , as well as any labels attached to it. summarize “summ var1” or “summ var1 var2 var3” ( or “summ" alone for the entire database ) Displays the mean, standard deviation, minimum, and maximum of the variable ( s ) . tabulate
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: tab var1 or tab var1 var2 For a single categorical variable, it presents the frequency distribution; for two categorical variables, it gives the joint frequency distribution. correlate corr var1 var2 Displays the coefficient of correlation between two variables. graph pie graph pie cat1 cat2 cat3 cat4 Creates a pie graph with the shares of people belonging to each category. The list of categories must be mutually exclusive, and contain the entire set of possibilities. graph hbox graph hbox var1 or graph hbox var1, over(var2) Creates a box-and-whiskers graph of the variable. With the over option, it does a graph for each category within the second variable. scatter scatter yvar xvar Creates a scatterplot, with the first variable on the y axis and the second on the x axis. ....
View Full Document

This note was uploaded on 03/19/2010 for the course ECON 400 taught by Professor Turchi during the Spring '08 term at UNC.

Ask a homework question - tutors are online