???-------------------------------------- ??? Problem Set No. 1: Repetition OLS ??? by: Katrin Sommerfeld ???-------------------------------------- options crt; freq N; ? Read in the data ? Adjust the location of data file if necessary read (file='L:\Microeconometrics\earnings04.raw') sex age educ exper noschool medschool highschool notrain appren uni earn ; ? Descriptive Statistics and checking ?-------------------------------------- msd(terse) @all ; ?stop; ?------------------------------------------------------------- ? Exercise 1 ?------------------------------------------------------------- title 'Exercise 1'; olsq earn c educ exper; ?stop; ?------------------------------------------------------------- ? Exercise 2 ?------------------------------------------------------------- ? Exercise 2a title 'Exercise 2a: Dummy'; olsq earn c educ exper sex ; ?stop ? Exercise 2b title 'Exercise 3b: Interaction Dummy'; ? Here: "Slopedummy" genr educsex=educ*sex ; olsq earn c educ exper sex educsex ; ?stop; ? Exercise 2c title 'Exercise 3c: Dummies'; olsq earn c exper sex appren uni ; title 'Hypothesis test for joint influence of training degrees'; frml test1 appren ; frml test2 uni ; analyz(noconstr) test1 test2 ; ?stop; ?------------------------------------------------------------- ? Exercise 3 ?------------------------------------------------------------- title 'Exercise 3a: quadratic Specification'; genr exper2 = exper**2; olsq earn c educ exper exper2 sex ; ?stop; frml test3 exper ; frml test4 exper2 ; title 'Test for joint significance of both experience terms'; analyz(noconstr) test3 test4; ?stop; title 'Exercise 3b'; ? marginal effect of work experience in quadratic specification ? Partial derivative of earnings on experience: ? d earnings/d exper=@coef(3) + 2*@coef(4)*exper set cexper=@coef(3); print cexper; set cexper2=2*@coef(4); print cexper2; title 'Earnings gain after one year on the job'; set earn1=cexper + cexper2*1; print earn1; title 'Earnings gain after ten years of work experience'; set earn10=cexper + cexper2*10; print earn10; ?stop; ?----------------------------------------------------- ? Supplementary exercise 4 ?----------------------------------------------------- title 'Exercise 4: semilog model'; genr lnearn=log(earn); msd(terse) lnearn earn; olsq lnearn c educ exper exper2 sex ; end;