Programming the statistical procedures from SAS

VECM estimation using Proc Model and F-statistics

Reply
Highlighted
Occasional Contributor
Posts: 7

VECM estimation using Proc Model and F-statistics

Hi All, 

 

I'm estimating a VECM using Proc Model (I prefer it to Proc VARMAX due to missing values issue / other issues).

I'm trying to get the regression significance F-statistics & Prob-F and output it (similar to the VARMAX output).

I tried to manually calculate it from the ResidSummary ODS Output, but got wrong results.

I would appreciate any help.

 

Attached are: example for data file (one day data), results printout, code.

 

Thanks, 

 

SK

 

 

 

 

Code:

/* Running Proc Model */

proc model data=xx ;
dp1 = dif(p1);
dp1L = lag(dp1);
dp2 = dif(p2);
dp2L = lag(dp2);
z2 = lag(p1) - b*lag(p2) - zmean2;
p1 = lag(p1) + a11*dp1L + a12*dp2L + g12*z2;
p2 = lag(p2) + a21*dp1L + a22*dp2L + g22*z2;
fit p1-p2 /SUR
outs=cov_Sur
outest=parm_SUR outcov outall;
ods output
ResidSummary=ResidSummary1
EstSummaryStats=EstSummaryStats1
ParameterEstimates=Parameter_Estimates1;
title2 "Estimating VECM with Proc Model";
quit;

/* Arranging & Calculating F statistics */
PROC SQL;
CREATE TABLE WORK.QUERY_FOR_RESIDSUMMARY1 AS
SELECT t1.EstType,
t1.Equation,
t1.ModelDF,
t1.ErrorDF,
t1.SS,
t1.MS,
t1.RMSE,
t1.RSquare,
t1.AdjRSq,
/* F-Stat */
((t1.RSquare/t1.ModelDF)/((1-t1.RSquare)/(t1.ErrorDF))/2) AS 'F-Stat'n,
/* ProbF */
(1-probf(((t1.RSquare/t1.ModelDF)/((1-t1.RSquare)/(t1.ErrorDF))),t1.ModelDF,t1.ErrorDF)) FORMAT=PVALUE6.4
AS ProbF
FROM WORK.RESIDSUMMARY1 t1;
QUIT;

 

/* Running an equivilant Proc VARMAX */
Proc varmax data=xx outest=tmpsas.est;
model p1 p2 / p=1 print=(estimates diagnose) /*noint*/;
cointeg rank=1 normalize=p1 ectrend;
ods output ANOVA=tmpsas.DiagnoseANOVA NObs=tmpsas.NObs;
title2 "Estimating VECM with Proc VARMAX";
run;

Ask a Question
Discussion stats
  • 0 replies
  • 148 views
  • 0 likes
  • 1 in conversation