📜  如何引导 - R 编程语言代码示例

📅  最后修改于: 2022-03-11 14:51:59.785000             🧑  作者: Mango

代码示例2
library(boot)

boot_returns <- function(data, indices){
  d <- data[indices]
  Return.calculate(d, method="log")
}

bret <- boot(end_eq, boot_returns, R=1000)

dim(bret$t)
bretMeans <- colMeans(bret$t, na.rm = TRUE)