错误消息:LDL'协方差矩阵的Bunch-Kaufman分解

时间:2013-02-05 17:57:38

标签: r matrix

我是R-Matrix的新手。我试图用R函数BunchKaufman(x,...)http://stat.ethz.ch/R-manual/R-devel/library/Matrix/html/BunchKaufman-methods.html

将奇异协方差矩阵分解为LDL'形式

请帮助我通过尾随“功能错误...”

过去的第一垒
A <- matrix( c( 0.184, 0.228, 0.252, 0.022, -0.022, 0.228, 1.053, 0.142, 0.106, -0.106,
+ 0.252, 0.142, 0.382, 0.015, -0.015, 0.022, 0.106, 0.015, 0.055, -0.055, 
+ -0.022, -0.106, -0.015, -0.055, 0.055), ncol=5, nrow=5)
BunchKaufman(A)
Error in function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘BunchKaufman’ for signature ‘"matrix"’

1 个答案:

答案 0 :(得分:1)

以下作品:

A&lt; - forceSymmetric(A)

syA&lt; - new(“dsyMatrix”,A,Dim = as.integer(c(nrow(A),nrow(A))),uplo =“L”)

BunchKaufman(SYA)