This file describes the replication file for "Testing Models of Low-Frequency Variability" by Ulrich Mueller and Mark Watson (March 7, 2008)

Data used in Section 4 are in the directory c:\nelson\ddisk\data
Gauss programs (*.gss and *.prc) used for many of the calculations are in the directory c:\nelson\ddisk\gss.
Miscellaneous files (Ox and Mathematica) are in the direction c:\nelson\ddisk\misc


Utility Programs Used in Many Places

psi_compute.prc          Computes Cosine transforms -- demeaned and detrended
rw_cov.prc               Computes Covariance Matrix of random walk (0 iniitial value)
rw2_cov.prc              Computes Covariance Matrix of integrated random walk (0 initial value)
dif_cov.prc              Computes Covariance Matrix for diffusion with local-to-unit parameter c
dif2_cov.prc             Computes Covariane Matrix for integrated diffusion
frac_cov.prc             Computes Covariance Matrix for (i) stationar LM model if -0.5<d<0.5, or (ii) integrated LM (with parameter d-1) of 1.50 < d < 1.5
pctile.prc               Compute Percentiles from a vector of numbers
marg_lf                  Compute scaled version of the density in King and Hillier (1985) Equation (2)
random_gen.gss           This programs generates a matrix of standard normal random variables. These are then saved and used in other programs 
s_cov_ha.prc             Computes values of covariance under alternative for S test
stest_pv.prc             Construct S-test pvalue for the null model with given covariance matrix 
h_cov_ha_frac.prc        Computes values of covariance under alternative for H test for the fractional model
h_cov_ha_ou.prc          Computes values of covariance under alternative for H test for the local-to-unity model
h_cov_ha_i0_i1_i2.prc    Computes values of covariance under alternative for H test for I(0), RW and integrated RW models. These are ingredients for the LLM covariance matrices
htest_i0_i1_pv.prc       Construct H-test pvalue for the I(0) or Unit Root Null Model
lfur_pv.prc              LFUR pvalue
lfst_pv.prc              LFST pvalue
lrstat_vec.prc           Compute LRStat as an average over a set of covariance matrices under Ha (used for S and H tests)
file_append.prc          Appends a new row to an existing file, creating the file if it does not exist
fcst.prc                 A variety of utility programs used in many MWW papers


Calculations:

Table 2:  Table2_Figure2.gss

Table 3:  The program EmpiricalResults1.gss computes the various test statistics and p-values for all of the series listed in the appendix.  These values are printed out in tabular form in Tables_EmpiricalResults_1.gss.  Table 3 contained selected entries from this output.
    
Table 4:  Results are computed in EmpiricalResults2.gss. Note, this requires critical values that are computed in H_CRITICALVALUES.GSS and S_CRITICALVALUES.GSS.   
       
Figure 1: Figure is plotted in figure1.gss based on results computed in \misc\r2figures.nb, a Notebook file for Mathematica (version 5.2)

Figure 2: Table2_Figure2.gss

Figure 3: Results are calculated in LFST_Rejection.gss and LFUR_Rejection.gss. Figure is plotted in Figure3.gss

Figure 4: Results are calculatied in s_lfst_lfur_rejection.gss.  Figure is plotted in Figure4.gss

Figure 5: Results are calculatied in h_rejection.gss.  Figure is plotted in Figure5.gss

Figure 6: Calculations and plot is formed in Figure6.gss

Figure 7: TVP calculations are performed in \misc\mktvddata.ox, an OX program.  Figure in plotted in Figure7.gss


Programs to compute local power of various tests:

1. LFST_Power.gss
   Compute Asymptotic Local Power of LFST test for various values of g under the alternative
   Note: this is used to find a value of g that yields size of approximately 0.5

2. LFUR_Power.gss
   Compute Asymptotic Local Power of LFUR test for various values of g under the alternative
   Note: this is used to find a value of g that yields size of approximately 0.5 
      
3. S_power.gss
   Comptue Asymptotic Local Power for S test for various values of local parameter. 
   Note: this is used to find a value of g that yields size of approximately 0.5    
 
4. H_power.gss
   Comptue Asymptotic Local Power for H test for various values of local parameter. 
   Note: this is used to find a value of g that yields size of approximately 0.5  

5. LFST_Rejection.gss
   Computes Asymptotic Power where data are generated by OU, Frac, and LLM

6. LUR_Rejection.gss
   Computes Asymptotic Power where data are generated by OU, Frac, and LLM

7. S_Rejection.gss
   Computes Asymptotic Power where data are generated by OU, Frac, and LLM

8. H_Rejection.gss
   Computes Asymptotic Power where data are generated by the mixture model from Ha, for various values of the standard deviation parameter.

9. S_Criticalvalues.gss
   Computes 1%, 5%, 10% critical values for S-test, LLM Model, Dif model and Frac model.
   
10. Graph_power.gss
    Computes Power Graphs based on output from LFST_Rejection, LFUR_Rejection, S_Rejection, H_rejection/   
