*==============================================================================* * Advanced Applied Econometrics * Jakub Muck * Exercise 8 * (i) and (ii) importing data, generating variables of interest and regression clear all use "http://e-web.sgh.waw.pl/jmuck/AAE/Datasets/cps.dta" gen lwage=ln(wage) gen exper2=exper^2 reg lwage educ exper exper2 female * (iii) Testing slope on the eduction local t_stat=(_b[educ]-.1)/_se[educ] local df=e(df_m) local t_crit=invt(`df',.95) local pval=1-t(`df',`t_stat') disp "t statistic: " `t_stat' disp "critical value: " `t_crit' disp "p-value: " `pval' * (v) Example hypothesis test (3*educ=-female) * (vi) Experience test(exper=0) (exper2=0) * (vii) The extreme point of experience at which wages are the highest nlcom(exper_star:_b[exper]/(-2*_[exper2]))