所以我试图计算这个公式,但结果很奇怪。元素非常大,所以我不确定我哪里出错了。我附上了公式的照片:
这是我的代码:
*calculating mu_sum and sigma_sum;
T_hat=180;
mu_sum_first_part={0,0,0,0};
mu_sum_second_part={0,0,0,0};
mu_sum={0,0,0,0};
*calculating mu_sum;
do i = 0 to T_hat;
term=(T_hat - i)*(B0**i)*a;
mu_sum_first_part = mu_sum_first_part + term;
end;
do i=1 to T_hat;
term =B0**i;
mu_sum_second_part = mu_sum_second_part + term;
end;
mu_sum = mu_sum_first_part + mu_sum_second_part*zt;
print mu_sum;
*calculating sigma_sum;
term=I(4);
sigma_sum=sigma;
do j=1 to T_hat;
term = term + B0**j;
sigma_sum = sigma_sum + (term*sigma*(term`));
end;
print sigma_sum;
我知道这很长,但请帮忙!!