📄 crthegy.m
字号:
5.61 6.38
5.55 6.27];
case {'theta24'}
pflag=6;
%det=1 (No Intercept, No Seasonal Dummy, No Trend)
%rows 48 100 160 200 400
%columns 10% 5% (size of the test)
zt(:,:,1) = [2.21 2.80
2.21 2.76
2.18 2.72
2.22 2.73
2.19 2.76];
%det=2 (Intercept, No Seasonal Dummy, No Trend)
%rows 48 100 160 200 400
%columns 10% 5% (size of the test)
zt(:,:,2) = [2.17 2.63
2.18 2.74
2.21 2.74
2.19 2.75
2.15 2.69];
%det=3 (Intercept, Seasonal Dummy, No Trend)
%rows 48 100 160 200 400
%columns 10% 5% (size of the test)
zt(:,:,3) = [5.16 6.60
5.18 6.05
5.16 6.04
5.14 5.99
5.15 5.95];
%det=4 (Intercept, No Seasonal Dummy, Trend)
%rows 48 100 160 200 400
%columns 10% 5% (size of the test)
zt(:,:,4) = [2.14 2.67
2.15 2.76
2.15 2.75
2.17 2.72
2.16 2.70];
%det=5 (Intercept, Seasonal Dummy, Trend)
%rows 48 100 160 200 400
%columns 10% 5% (size of the test)
zt(:,:,5) = [5.13 6.09
5.13 5.99
5.14 5.91
5.10 5.89
5.1 5.9];
case {'theta34'}
pflag=7;
%det=1 (No Intercept, No Seasonal Dummy, No Trend)
%rows 48 100 136 200
%columns 10% 5% 2.5% 1% (size of the test)
zt(:,:,1) = [2.45 3.26 4.04 5.02
2.39 3.12 3.89 4.89
2.41 3.14 3.86 4.81
2.42 3.16 3.92 4.81];
%det=2 (Intercept, No Seasonal Dummy, No Trend)
%rows 48 100 136 200
%columns 10% 5% 2.5% 1% (size of the test)
zt(:,:,2) = [2.32 3.04 3.78 4.78
2.35 3.08 3.81 4.77
2.36 3.00 3.70 4.73
2.37 3.12 3.86 4.76];
%det=3 (Intercept, Seasonal Dummy, No Trend)
%rows 48 100 136 200
%columns 10% 5% 2.5% 1% (size of the test)
zt(:,:,3) = [5.50 6.60 7.68 9.22
5.56 6.57 7.72 8.74
5.56 6.63 7.66 8.92
5.56 6.61 7.53 8.93];
%det=4 (Intercept, No Seasonal Dummy, Trend)
%rows 48 100 136 200
%columns 10% 5% 2.5% 1% (size of the test)
zt(:,:,4) = [2.23 2.95 3.70 4.64
2.31 2.98 3.71 4.70
2.33 3.04 3.69 4.57
2.34 3.07 3.76 4.66];
%det=5 (Intercept, Seasonal Dummy, Trend)
%rows 48 100 136 200
%columns 10% 5% 2.5% 1% (size of the test)
zt(:,:,5) = [5.37 6.55 7.70 9.27
5.52 6.60 7.52 8.79
5.55 6.62 7.59 8.77
5.56 6.57 7.56 8.96];
otherwise
error('Wrong type');
end
%No. of Observations
%recode strings
%pflag String
%1 pi1
%2 pi2
%3 pi3
%4 pi4
%5 theta14
%6 theta24
%7 theta34
if pflag==1|pflag==2|pflag==3|pflag==4|pflag==7
%rows 48 100 136 200
if (nobs>=0 & nobs<=48);
r=1;
c=asgc(sig,pflag);
elseif (nobs>49 & nobs<=100);
r=2;
c=asgc(sig,pflag);
elseif (nobs>101 & nobs<=136);
r=3;
c=asgc(sig,pflag);
elseif (nobs>137 & nobs<=200);
r=4;
c=asgc(sig,pflag);
else
error('Wrong nobs');
end;
else if pflag==5|pflag==6
%rows 48 100 160 200 400
if (nobs>=0 & nobs<=48);
r=1;
c=asgc(sig,pflag);
elseif (nobs>49 & nobs<=100);
r=2;
c=asgc(sig,pflag);
elseif (nobs>101 & nobs<=160);
r=3;
c=asgc(sig,pflag);
elseif (nobs>161 & nobs<=200);
r=4;
c=asgc(sig,pflag);
elseif (nobs>201 & nobs<=400);
r=5;
c=asgc(sig,pflag);
else
error('Wrong nobs');
end;
else
error('Wrong type');
end;
end
%critical value
crit = zt(r,c,det);
function c = asgc(sig,pflag)
% define column
if pflag==1|pflag==2|pflag==3
%columns 1% 2.5% 5% 10% (size of the test)
switch sig
case 0.01
c=1;
case 0.025
c=2;
case 0.05
c=3;
case 0.1
c=4;
otherwise
error('Wrong sig');
end;
elseif pflag==4
%columns 1% 2.5% 5% 10% 90% 95% 97.5% 99% (size of the test)
switch sig
case 0.01
c=1;
case 0.025
c=2;
case 0.05
c=3;
case 0.1
c=4;
case 0.9
c=5;
case 0.95
c=6;
case 0.975
c=7;
case 0.99
c=8;
otherwise
error('Wrong sig');
end;
elseif pflag==7
%columns 10% 5% 2.5% 1% (size of the test)
switch sig
case 0.1
c=1;
case 0.05
c=2;
case 0.025
c=3;
case 0.01
c=4;
otherwise
error('Wrong sig');
end;
elseif pflag==5|pflag==6
%columns 10% 5% (size of the test)
switch sig
case 0.1
c=1;
case 0.05
c=2;
otherwise
error('Wrong sig');
end;
else
error('Wrong type');
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -