regression function is : Array
Array




In the following data, variable value is the value of 1952, pi1952 is the price index based on 1952
and the time range is from 1953-1978. So, I drop data if year is 1952 and 1990 after changing based price using 1990 price index.
note: when t=0, it means 1978 and t-1 is 1977.

data:
[CODE]
* Example generated by -dataex-. To install: ssc install dataex
clear
input int t double(value pi1952)
1952 80.7 1
1953 115.3 .988
1954 140.9 .982
1955 145.5 .94
1956 219.6 .937
1957 187 .897
1958 333 .901
1959 435.7 .976
1960 473 .973
1961 227.6 .955
1962 175.1 1.025
1963 215.3 1.075
1964 290.3 1.053
1965 350.1 1.018
1966 406.8 .998
1967 323.7 1.002
1968 300.2 .967
1969 406.9 .945
1970 545.9 .945
1971 603 .955
1972 622.1 .967
1973 664.5 .968
1974 748.1 .969
1975 880.3 .981
1976 865.1 .988
1977 911.1 1.002
1978 1073.9 1.008
1990 . 1.862
end

I change the value to 1990 price, and related codes are as following:
gen index=1/1.862
gen pi1990=pi1952*index
gen year=t-1978
drop in 1
tsset year,yearly
replace value=value/pi1990
gen lv=log(value)
drop if t==1990
reg lv year
predict e,res
twoway (scatter e e2)(lfit e e2)
twoway (scatter e e3)(lfit e e3)
estat bgo // Prob > chi2 0.0036<0.05
wntestq e1 //Prob > chi2(11) = 0.0469
di 26^(1/4) // and gain 3

newey lv year,lag(3)

I actually regress the data and cannot obtain the same coefficients as the author.
I don't know what problems I have in my codes, please help me.

and my results: Array





but the author gains coefficients like this: Array
Array