Using Stata for Survey Data Analysis


Using Stata for Survey Data Analysis


Download 1.39 Mb.
Pdf ko'rish
bet55/61
Sana08.03.2023
Hajmi1.39 Mb.
#1252470
1   ...   51   52   53   54   55   56   57   58   ...   61
Bog'liq
2009 Usingstataforsurveydataanalysis (1)

Using Stata for Survey Data Analysis 
 
Minot 
 
Page 51
probit y x1 x2 x3
run a probit with y as dependent and x’s as independent 
probit x1 x2 x3, robust 
run a “robust” probit (weaker assumptions about error) 
dprobit y x1 x2 x3 if reg4 ==1 
run the probit in one region only 
predict  
This command can be used to obtain predictions, residuals, etc., after regression analysis.
predict newvarname [if exp] [in range] [, options] 
Two of the most common options are: 
xb 
predicted values of y are put in newvarname 
e 
residuals of the regression are put in newvarname 
For example: 
regress y x1 x2 x3 
predict yhat, xb 
creates variable yhat with predicted values 
predict e, resid 
creates variable e with residuals 
probit poverty agehead sexhead housing
predict index, xb
creates variable index with the value of sum of XB 
predict phat 
creates variable phat with the predicted probability 
test  
This command tests hypotheses about the estimated parameters from the most recently estimated 
model. For example,
regress y agehead female educ region1 region2 region3 region4 
test region1=region2 
test hypothesis that region1 coef = region2 coef 
test educ=.1 
test hypothesis that educ = 0.1 
test region1 region2 region3 region4 
test of hypothesis that four region dummies are zero 
If you want to test the hypothesis that a set of related variables are all equal to zero, you can use the 
related testparm command: 
testparm region*
test of hypothesis that all region* dummies are zero 
 
ovtest  
Regression analyis generates the best unbiased linear estimates of the “true” coefficients provided that 
some assumptions are satisfied. One assumption is that there are no missing variables that are 
correlated with the error term. This command performs a Ramsey RESET to test for omitted 
variables (misspecification). The syntax is: 

Download 1.39 Mb.

Do'stlaringiz bilan baham:
1   ...   51   52   53   54   55   56   57   58   ...   61




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling