List_of_Stata_Commands_1 - correlate Computes the...

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

View Full Document Right Arrow Icon
List of Stata Commands: Lab Session 1 Introduction to Stata Command cd c:/data/ Tells Stata that your working folder is Data on disc C. From now on Stata will look for data files and save log files or data files in this folder. log using session1, text Creates a text file session1.log in your working folder c:/Data. All your commands and results from now on will be recorded in this file. You can view this text file and copy your results or commands later. help regress Gives help information on regress command, can be used with any command use gpa.dta Opens a gpa.dta file saved in your working folder insheet using gpa.csv Opens a gpa.csv file saved in your working folder save gpa1.dta Saves data file after making changes clear Clears an open dataset from memory, need to do this before opening a new dataset describ e Gives a description of the open data file:variable names and labels. summarize Gives descriptive statistics for all variables in the dataset Summarize var1 var2 Gives descriptive statistics for var1 and var2
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: correlate Computes the correlation matrix between all variables Correlate var1 var2 Computes correlations between var1 and var2 list Lists the values of all variables for all observations list in 1/20 Lists the values of all variables for the first 20 observations list var1 var2 in 1/20 Lists the values of var1 and var2 for the first 20 observations scatter y x Plots the scatterplot of y against x regress y x Runs an OLS regression of y on x without taking into account heteroskedasticity regress y x, robust Runs an OLS regression of y on x taking into account heteroskedasticity predict yhat Computes a series of fitted values of y from the regression estimated above predict uhat, resid Computes a series of residuals from the regression estimated above scatter gpa hsgpa || line yhat hsgpa, sort Plots the regression line (fitted values of y) and the scatterplot on the same graph log close Closes the log file with your results exit Exit Stata...
View Full Document

This note was uploaded on 11/20/2011 for the course ECON 420 taught by Professor Silous during the Spring '11 term at Emory.

Ask a homework question - tutors are online