List_of_Stata_Commands_2

List_of_Stata_Commands_2 - greater or equal to 3.7 drop...

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 2 Linear Regression Command sort sex Sorts the dataset by sex variable by sex: summarize Gives descriptive statistics for all variables in the dataset for female and male students separately sort white Sorts the dataset by white variable by white: summarize Gives descriptive statistics for all variables in the dataset for white and non-white students separately tabulate sex Tabulates the values of a categorical variable, provides percentages of female and male students tabulate sex race Cross-tabulates two categorical variables tabulate sex, summarize (gpa) Gives descriptive statistics for gpa variable for female and male students generate highhsgpa=0 Creates a new variable highhsgpa which takes the value of 0 for all observations replace highhsgpa=1 if hsgpa>=3.7 Replaces existing values of highhsgpa with 1 if hsgpa is
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: greater or equal to 3.7 drop var1 Drops var1 from the dataset Keep if sex==1 Dropa all observations with sex=0 regress gpa highhsgpa sex race Regresses gpa on highhsgpa sex and race test highhsgpa sex race Computes the F-statistic for the test that the three coefficients are equal to 0 (or jointly insignificant) test sex = - race Computes the F-statistic for the test that the coefficient are equal to each other but have opposite sign predict uhat, resid scatter uhat highhsgpa Plots the residuals against the highhsgpa variable histogram uhat, normal Draw a histogram for residuals and a standard normal density function gen uhatsq=uhat*uhat Creates a series of squared residuals scatter uhatsq highhsgpa Plots the squared residuals (or their variance) against the highhsgpa variable imtest, white Performs White test for heteroskedasticity...
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