我正在尝试计算 T 平方。我有以下参数:
> invS #inverse variance covariance matrix
x1 x2
x1 0.005536320 -0.001167908
x2 -0.001167908 0.002635186
> n # number of rows
[1] 11
> d_mean
x1 x2
-9.363636 13.272727
当我试图计算 T 平方时:
> Tsq <- n* d_mean*invS*t(d_mean)
...我收到此错误:
Error in n* d_mean*invS*t(d_mean) : non-conformable arrays
我究竟做错了什么?