*
* ExampleFive.RPF
* RATS Introduction, Example from Section 1.6
*
open data wages1.dat
data(format=prn,org=columns) 1 3294 exper male school wage
*
* Do basic statistics on the two subsamples. The first is where "male" is
* non-zero, the second where .not.male is non-zero, that is, where male
* itself is zero.
*
stats(smpl=male) wage
stats(smpl=.not.male) wage
*
* The regression on constant and the male dummy will give the same type
* of information in a form which will usually be easier to interpret. The
* coefficient on the intercept will be the same as the mean for the
* females, while the coefficient on the male dummy is the difference
* between the mean for males and the mean for females.
*
linreg wage
# constant male
*
* Adds school and exper to the regression and test the joint
* significance of the two additional variables.
*
linreg wage
# constant male school exper
*
* This is generated by the Regression Tests Wizard
*
test(zeros)
# 3 4
*
* The same test can also be done using EXCLUDE
*
exclude
# school exper
*
* Generate the fitted values from the original regression and do an
* Actual-Fitted graph.
*
linreg wage
# constant school
prj wagefit
*
scatter(style=symbols,overlay=lines,ovsame,$
vlabel="Hourly Wages",hlabel="Years of School") 2
# school wage
# school wagefit