3.1997 -20.4687 6.6853 161.9111
2.8117 -20.9482 6.5279 162.1779
3.1664 -21.0637 6.3374 162.7393
2.7864 -20.2575 6.8158 162.4358
2.4984 -20.6846 6.7082 162.0099
3.0913 -20.5642 6.6328 161.9037
2.6621 -20.6901 6.2052 162.4883
2.5905 -20.8337 6.4628 162.3770
Yall =
6.0719 -19.1491 9.8373 165.2897
5.2901 -19.6243 8.5404 164.1257
5.4039 -21.1021 8.6097 163.6705
3.2741 -17.1903 12.8710 164.6585
6.6158 -18.2346 9.0057 166.7196
6.7152 -19.0349 9.2901 165.9242
3.4051 -15.8481 8.4309 164.4530
8.7645 -14.7943 10.9563 165.1408
7.2246 -20.3398 7.5563 167.1481
7.9144 -15.5130 10.0093 166.7199
6.1805 -18.1420 10.1556 166.0201
7.1599 -16.9574 7.4808 165.2733
3.5461 -16.7282 10.2308 164.6781
6.0613 -18.3470 9.5969 165.0340
4.9115 -16.8629 8.4037 163.7214
4.6745 -15.2243 12.5411 166.0598
2.8145 -20.4888 6.8743 162.1732
2.7300 -20.6144 6.3793 162.2295
2.5351 -20.7744 6.5124 162.6791
2.4826 -20.8751 6.2126 161.9913
2.4795 -20.4030 6.5088 162.1066
2.5271 -21.0645 6.6315 162.3103
3.2640 -20.5948 6.8780 162.3172
2.6547 -20.3785 6.6731 162.0635
3.1997 -20.4687 6.6853 161.9111
2.8117 -20.9482 6.5279 162.1779
3.1664 -21.0637 6.3374 162.7393
2.7864 -20.2575 6.8158 162.4358
2.4984 -20.6846 6.7082 162.0099
3.0913 -20.5642 6.6328 161.9037
2.6621 -20.6901 6.2052 162.4883
2.5905 -20.8337 6.4628 162.3770
MeanYB =
2.7684 -20.6690 6.5653 162.2446
MeanYall =
4.2971 -19.1811 8.0800 163.7672
Количество, когда Q_M > Q_MB:
sq_m =
2
Оценки параметров базовой модели, рассчитанные взвешенным МНК
Q_M =
5.8258
-4.2481
-2.9002
0.4920
Оценки параметров модели с учетом данных, сгенерированных бутстреп-методом, рассчитанные взвешенным МНК :
Q_MB =
4.2971
-4.2188
-2.9064
0.4923
3.3. По сгенерированным данным (п.1)
sigma = 1.5;
Q=[6 -4 -3 0.5];
N = 16;
X1=[0:0.1:10];
rnd=[];
Ysred=[];
k_intrv=5;
KB=100;
YB=[];
Yall=[];
MeanYall=[];
MeanYB=[];
PLAN=[
0 N;
2.765 N;
7.235 N;
10 N;
];
sq_m=0;
for l=1:KB
random = randn(N+1,4)*sigma;
Ysred = mean(Ymodel);
for i=1:N
for j=1:4
YB(i,j)=Ysred(j)+random(i,j);
end
end
Yall = [Ymodel;YB];
MeanYB = mean(YB);
MeanYall = mean(Yall);
Q_M=inv(F'*F)*F'*Ysred';
k=4;
D_MB=[];
for i= 1: k
sum = 0;
for j= 1: 2*N
sum = sum + (Yall(j,i)-MeanYall(i))^2;
end
D_MB(i) = (1/((2*N)*(2*N-1)))*sum;
end
D = diag(D_MB);
M = F'*inv(D)*F;
Q_MB=inv(M)*F'*inv(D)*MeanYall';
sqm=0;
sqmb=0;
for i= 1: k
sqm = sqm + (Q(i)-Q_M(i))^2;
sqmb = sqmb + (Q(i)-Q_MB(i))^2;
end
if sqm > sqmb
sq_m=sq_m+1;
end
end
Ymodel
Ysred
YB
Yall
MeanYB
MeanYall
sq_m
Q_M
Q_MB
Результаты
Ymodel =
8.5444 -16.7598 9.8265 166.9943
7.0834 -18.9879 9.7658 166.1934
3.6379 -18.0983 9.1599 164.3775
4.3880 -16.7007 10.3927 166.5148
4.9292 -16.7954 8.8020 165.7917
7.4852 -15.9975 7.7978 166.7088
5.8611 -17.5693 12.0178 165.5934
7.1259 -17.5272 7.4251 166.5637
6.6186 -17.0837 12.4536 165.3449
6.4305 -15.5659 8.8766 165.8230
6.2121 -15.9700 10.1831 164.1200
6.3538 -16.3374 8.5878 166.9151
5.9857 -18.3566 7.3265 167.9977
6.1652 -19.3342 9.5829 165.5141
7.2786 -18.7227 9.6440 165.0974
8.1598 -17.9350 9.0559 164.5018
Ysred =
6.3912 -17.3588 9.4311 165.8782
YB =
3.5732 -19.3066 9.1647 167.7800
8.1687 -18.4595 12.7524 166.4022
8.0079 -15.7426 9.4738 166.9310
9.3369 -16.8263 10.6946 166.5361
5.3775 -18.4514 9.7028 165.9238
6.0888 -16.2601 10.9819 163.5222
5.1197 -17.1408 7.8966 166.5034
7.7729 -18.0997 8.9014 163.9780
5.3096 -17.2352 7.6208 166.4093
7.9773 -18.2365 10.7248 168.8782
4.1397 -17.3032 10.2841 164.6787
7.4922 -17.7366 9.0004 166.5097
6.9227 -16.5932 7.5252 165.0259
5.5793 -18.2443 7.6788 165.0293
3.9445 -15.5803 8.0816 170.7771
5.5234 -16.6379 9.8836 164.6498
Yall =
8.5444 -16.7598 9.8265 166.9943
7.0834 -18.9879 9.7658 166.1934
3.6379 -18.0983 9.1599 164.3775
4.3880 -16.7007 10.3927 166.5148
4.9292 -16.7954 8.8020 165.7917
7.4852 -15.9975 7.7978 166.7088
5.8611 -17.5693 12.0178 165.5934
7.1259 -17.5272 7.4251 166.5637
6.6186 -17.0837 12.4536 165.3449
6.4305 -15.5659 8.8766 165.8230
6.2121 -15.9700 10.1831 164.1200
6.3538 -16.3374 8.5878 166.9151
5.9857 -18.3566 7.3265 167.9977
6.1652 -19.3342 9.5829 165.5141
7.2786 -18.7227 9.6440 165.0974
8.1598 -17.9350 9.0559 164.5018
3.5732 -19.3066 9.1647 167.7800
8.1687 -18.4595 12.7524 166.4022
8.0079 -15.7426 9.4738 166.9310
9.3369 -16.8263 10.6946 166.5361
5.3775 -18.4514 9.7028 165.9238
Уважаемый посетитель!
Чтобы распечатать файл, скачайте его (в формате Word).
Ссылка на скачивание - внизу страницы.