epoh 发表于 2012-4-11 18:45 
/*请自行先把数据处理好*/
month year x y
1 1960 123 321
我用了修改后的程序跑我的数据,但出来的结果第一行就是===========================MS OLS and MSVAR Analysis with MSVARlib - Copyright (C) 2004 by Benoit BELLONE ==================================
Data File MSVARUN
Date: 4/15/12 Initial time: 20:26:43
Start and ending period
86.00000000 530.00000000
Options
_K, 1.00000000, _M, 2.00000000, _M_V, 2.00000000, _Var_opt, 2.00000000, _typmod, 1.00000000, _p, 1.00000000
而我的程序明明已经改成了
/*===============================================Choosing your model ======================================================*/
_K=2;
_M=2;
_M_V=_M; /* _M_V=1 : no switch in variance or _MV_=_M : switch in variance */
_Var_opt=1;
_typmod=3;
_p=1; /* degree of the MSVAR(p) for p>=1 if under construction */
_n_x=1; /* number of exogenous, switching variables (including intercept) _n_x=1 by default for the model 1 */
_n_z=1; /* number of exogenous, non-switching variables (including intercept) _n_z=1 by default for the model 1 */
/*========================================================================================================*/
/* k_lag degree of transformation of data : 100.(F(x(t))-F(x(t-k_lag))) */
/* F_option : transformation mode =(0,1,2) : 0 id, 1 dlog(.), 2 d(.) (notice that if k==0 f_option is set to 0)*/
/* d_option : second transformation of data =(0,1,2) : 0 id, 1 demeaned series (x-E(X)), 2 standardized series (X-D(X)./Sigma(X)*/
/*=======================================================================================================*/
F_option=0;
k_lag=0;
d_option=0;
/* ==========Start and ending index : some common available values for US events (see readme for templates of dates) =========== */
deb=1;
fin=26;
/*
Some date : 1960-1 : 1, 1964-1 :49, 1967-2 :86, 1979-1 : 229 ,1984-1 : 289, 1985-1 : 301 1989-1: 349, 1989-12: 360, 1995-1 : 421, 1999-12 : 480, 2000-12 : 492,
Last available date : 2003-1 517
Estimating Date : 1985-1 : 301 , 1989-1: 349 , 1999-12 : 480, 2000-12 :492, 2003-1 : 517, 2004-2: 529
Starting Date : 1967-2 :86, 1979-1 : 229
*/
/*========== =======================================Datation reference options ========================================*/
/* if _apriori==0, no reference datation is needed, else you need to provide an apriori datation, si ref_date.xls for an example */
/* date_col may be optional (put in @ @) if you want to skip it */
/*========== =====================================================================================================*/
_apriori=0;
date_col=3; /* column number of the selected datation, for MSVARrec4 "Recessions NBER" (date_col=7), "3_state Anas" (date_col=8) */
/*==============================================================*/
/* ESTIMATION or FILTERING with initial parameters ? */
/* Estim : 1 if estimation, 0 if filtering */
/* if estim = 0, a parameter matrix should be imported */
/*==============================================================*/
estim=1;
/*====================================Choosing your model - end of section===============================================