{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

List_of_Stata_Commands_2

List_of_Stata_Commands_2 - greater or equal to 3.7 drop...

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

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
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

{[ snackBarMessage ]}

Ask a homework question - tutors are online