January, 2017

This package contains 3 files:

1) fgls_single.prg 
This is the program to estimate the basic model with a known single frequency, fk, and test for the presence of a nonlinear deterministic trend. You can choose three parameters. First, select the type of the model: the constant case when pd=0 or the linear trend case when pd=1. Second, choose an estimator for the sum of the autoregressive coefficients: the upper biased estimator when ma=0 or the median unbiased estimator when ma=1. Third, take the frequency used in the regression, fk, from {1, 2, 3, 4, 5}. Currently, it is set to 1 (fk=1).

2) fgls_multiple.prg 
This is the program to replicate the results of Table 7 and 8 of Perron, Shintani, and Yabu (2016). Here we estimate the number of the total frequencies using the general to specific approach. Select the maximum number of frequencies, maxn, from {1, 2, 3, 4, 5}. Currently, it is set to maxn=3. Choose the significance level for the sequential procedure: 1% (sig=0), 5% (sig=1) or 10% (sig=2). Currently, it is set to 1% (sig=0). The parameters pd and ma are the same as the ones in fgls_single.prg.

3) hadcrust.txt 
This file contains the time series of the global, northern hemispheric and southern hemispheric temperatures from the HadCRUT3 database. This dataset covers from 1856 to 2010, except for the southern hemispheric temperature from 1850 to 2010. Since the starting year is different, when you replicate the empirical results of Perron, Shintani and Yabu (2016), define the dependent variable, y, as follows:
y = data[7:161,1]; @Global Temperature@
y = data[7:161,2]; @Northern Hemisphere Temperature@
y = data[.,3];     @Southern Hemisphere Temperature@

This program is distributed freely for non-profit academic purposes only. We would appreciate that you acknowledge using this code in your research and cite the relevant papers on which it is based:
1)Perron and Yabu (2009): "Estimating Deterministic Trends with an Integrated or Stationary Noise Component," Journal of Econometrics 151, 56-69.
2)Perron, Shintani, and Yabu (2016): "Testing for Flexible Nonlinear Trends with an Integrated or Stationary Noise Component," revision requested by Oxford Bulletin of Economics and Statistics.
We cannot be held responsible for any consequences that could result from remaining errors. Comments about errors, possible improvements and so on are most welcomed and should be directed to Tomoyoshi Yabu at tyabu@fbc.keio.ac.jp
