*
* @GPH( options) series start end
* Estimates fractional difference power for series using the frequency
* domain regression techniques of Geweke and Porter-Hudak.
*
* Parameters:
* series series to analyze. This is usually the first difference
* of the series actually being studied.
* start end range to analyze (by default, full range of series)
*
* Options:
* POWER=Lowest T^power frequencies are used in running the
* regression. Default is .5 (i.e. use square root of the number
* of observations
* [PRINT]/NOPRINT
* TITLE=title for output ["Geweke-Porter-Hudak Regression: Series ...]
*
* Revision Schedule (by Estima):
* 12/1992 SIN function should be evaluated at (2(pi)j/T)/2,j=0,...,T-1.
* Added calculation of both asymptotic and OLS standard errors
*
* 11/1997 Added CLEAR instruction to clear out FREQS(1) and (2). This avoids
* problems that could occur if you re-executed GPH in a given session
* with a shorter number of ordinates (i.e. by using a smaller POWER),
* which could leave old data in the FREQS series.
*
* 07/2010 Switch to use REPORT. Add PRINT and TITLE options.
* 06/2012 Define %%D and %%DSE
*
* Variables Defined:
* %%D estimated value of D
* %%DSE estimated standard error of D
* %NOBS number of ordinates in the regression
*
* Reference:
* Geweke and Porter-Hudak(1983), "The Estimation and Application of Long
* Memory Time Series Models", J. of Time Series Analysis, vol 4, no 4,
* 221-238.
*
procedure gph series start end
type series series
type integer start end
*
options real power 0.50
option switch print 1
option string title
*
local integer startl endl ords obs
local vector[series] freqs
local string ltitle
local report greport
*
declare real %%d %%dse
*
inquire(series=series) startl<