# Replicating Mankiw, Romer and Weil, QJE 1992 # They use data for a cross section of countries open mrw.gdt # Replicate Table I, "Estimation of the Textbook Solow model" # ln y = b0 + b1 lns + b2 ln(n + g + d) + e # They assume that g + d = 0.05 genr ly = log(gdp85) genr ngd = 0.05 + (popgrow/100) genr lngd = log(ngd) genr linv = log(inv/100) ## just for fun gnuplot ly popgrow --output=display gnuplot ly linv --output=display # We use only the more reliable countries smpl intermed=1 --restrict --replace ols ly const linv lngd --robust # Test restriction that coefficients are equal in magnitude (opposite in sign) # We need to use b[varname] or b[position], # we don't need to save the coefficients here restrict --quiet b[linv] + b[lngd] = 0 end restrict #Or restrict --quiet b[2] + b[3] = 0 end restrict # with the quiet option the restricted model is not shown (optional) # Force both coefficients to be the same in magnitude # New model: # ln y = b0 + b1 lns -b1 ln(n + g + d) + e # O: # ln y = b0 + b1 (lns - ln(n + g + d)) + e genr x = linv - lngd ols ly const x --robust b = $coeff(x) # Value of alpha implied alpha = b/(1+b) # Replicate Table II: Estimation of the augmented Solow model # ln y = b0 + b1 lns + b2 ln(n + g + d) + b3 lnsh + e # proxy for sh = school genr lsh = log(school/100) ols ly const linv lngd lsh --robust # Test restriction that the sum of the coefficients is zero restrict b[linv] + b[lngd] + b[lsh] = 0 end restrict # Restrict the coefficients: bottom half of the table # New model: # ln y = b0 + b1 lns + (- b1 - b3) ln(n + g + d) + b3 lnsh + e # O: # ln y = b0 + b1 (lns - lngd) + b3 (lnsh - lngd) + e genr x1 = linv - lngd genr x2 = lsh - lngd ols ly const x1 x2 --robust c = $coeff # Values of alpha and beta implied alpha = c[2]/(1 + c[2] + c[3]) beta = c[3]/(1 + c[2] + c[3]) #Also: c1 = $coeff(x1) c2 = $coeff(x2) alpha = c1/(1 + c1 + c2) beta = c2/(1 + c1 + c2) # Convergence genr ly60 = log(gdp60) genr ldif = log(gdp85) - log(gdp60) # Unconditional convergence (Table III) ols ldif const ly60 --robust # Look at this R2!! # Conditional convergence - Basic Solow Model ols ldif const ly60 linv lngd --robust # Conditional convergence - Augmented Solow Model (Table V) ols ldif const ly60 linv lngd lsh --robust restrict b[linv] + b[lngd] + b[lsh] = 0 end restrict # Restricted model (we use x1 and x2 generated before) # Table VI in the paper (equation (16)), t=25 years ols ldif const ly60 x1 x2 --robust c = $coeff # Lambda: we use the coefficient on ly60 lambda = -ln(1 +c[2])/25 # Values of alpha and beta implied (equation (16)) alpha = c[3]/(-c[2] + c[3] + c[4]) beta = (c[4])/(-c[2] + c[3] + c[4])