簡體   English   中英

錯誤消息:協方差矩陣的LDL'Bunch-Kaufman分解

[英]Error msg: LDL' Bunch-Kaufman decomposition of covariance matrix

我是R-Matrix的新手。 我正在嘗試使用R函數BunchKaufman(x,...)將奇異協方差矩陣分解成LDL'形式http://stat.ethz.ch/R-manual/R-devel/library/Matrix/html/BunchKaufman- Methods.html

請通過結尾的“函數錯誤...”幫助我超越第一手資料。

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"’

以下作品:

A <-forceSymmetric(A)

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

BunchKaufman(syA)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM