[英]understanding the output of str function in R
我使用 str 打印出計算變量的信息
str(samples)
'mcmc' num [1:1000, 1:228] 0.1079 -0.2367 -0.0757 -0.3414 -0.3382 ...
- attr(*, "dimnames")=List of 2
..$ : NULL
..$ : chr [1:228] "B[1,1,1]" "B[2,1,1]" "B[3,1,1]" "B[4,1,1]" ...
- attr(*, "mcpar")= num [1:3] 20005 25000 5
但是如何閱讀這些信息,或者這個output能告訴我們什么? 例如,第三個組件是attr(*, "mcpar")= num [1:3] 20005 25000 5
,這是什么意思?
attr
意味着有一個名為“mcpar”的屬性,它是一個numeric
向量
attributes(samples)
返回樣本所有屬性的list
,即它將dimnames
作為一個屬性返回,將“mcpar”作為另一個屬性返回
根據文檔
MCMC object 的“mcpar”屬性給出了鏈的開始迭代、結束迭代和細化間隔。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.