【发布时间】:2015-02-20 02:22:59
【问题描述】:
我用 R 写了这段代码:
library(boot)
bs <- function(formula, data, indices) {
d <- data[indices,] # allows boot to select sample
fit <- lm(formula, data=d)
return(coef(fit))
}
results <- boot(data=z, statistic=bs,
R=1000, formula=z[,1]~z[,2])
我正在尝试使用包含我的响应和我的预测器的数据帧进行随机 x 重采样,但是我的结果返回时没有偏差和标准。
Bootstrap Statistics :
original bias std. error
t1* 83.5466254 0 0
t2* -0.6360426 0 0
谁能发现问题?
【问题讨论】:
标签: r regression statistics-bootstrap