Professional Documents
Culture Documents
cd "C:\Users\H\Desktop"
*Initiate your log file: Save your commands and results under your working direc
tory
log using 24October2016.log
*Note that the data set is under different folder on your computer. Do not forge
t to adapt the path to your computer.
use "C:\Users\H\Desktop\AppEcon1\wage1.dta", clear
*****STORING REGRESSION RESULTS IN STATA AND CREATING TABLES
reg wage marmale marfem singfem
*After the regression, let's store the results of this regression and name it re
g1
estimates store reg1
reg wage marmale marfem singfem educ exper expersq tenursq tenure
estimates store reg2
*Now present the results of these regressions in a table,
*b:coefficient estimates, se: standart errors.
*b(%8.4f) is about the font and rounding sensitivity of the output.
estimates table reg1 reg2, b se t p stats(N r2) b(%8.4f)
***LPM (Linear Probability Model)
*Binary dependent variable y = 1 or y = 0. it may indicate
*whether an adult has a high school education, whether a
*household owns a house, whether an adult is married, owns a
*car, etc.
*The case where y = 1 is called success whereas y = 0 is called
*failure.
*What happens if we regress a 0-1 variable on a set of
*independent variables? How can we interpret regression
*coeffcients?
**Slope coefficients are now interpreted as the change in the
*probability of success in the LPM model.DeltaP(y=1|x) = Bjdelta_xj
use "C:\Users\H\Desktop\AppEcon1\MROZ.dta", clear
*y (inlf - in the labor force) equals 1 if a married woman
*reported working for a wage outside the home in 1975, and 0
*otherwise.
*Definitions of explanatory variables
*nwifeinc: husband's earnings (in $1000),
*kidslt6: number of children less than 6 years old,
*kidsge6: number of children between 6-18 years of age,
*educ; exper; age
reg inlf nwifeinc kidslt6 kidsge6 age educ exper
*All variables are individually statistically significant
*except kidsge6. All coefficients have expected signs using standard
*economic theory and intiution.
*Interpretation of coefficient estimates: For example, the
*coefficient estimate on educ, 0.038, implies that, ceteris
*paribus, an additional year of education increases predicted
*probability of labor force participation by 0.038.
*The coefficient estimate on nwifeinc: if husband's income
*increases by 10 units (ie, $10000), the probability of labor
*force participation falls by 0.034.
*exper has a quadratic relationship with inlf: the effect of
"C:\Users\H\Desktop\AppEcon1\SAVING.dta", clear
sav inc
sav inc [aw = 1/inc]
sav inc size educ age black
sav inc size educ age black [aw = 1/inc]