討論串重複取樣不放回(不使用sample)
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁
內容預覽:
大家好. 最近在上程式語言的課. 教授請我們跑bootstrap. 但不使用sample的function 而是自己寫function. 條件為. Create a function call my.sample with three arguments:. x:the data to be res
(還有217個字)
內容預覽:
my.sample <- function(x, n, replace = FALSE) {. if (!replace && length(x) < n). stop("The size must be less than the size of x when replace is TRUE.")
(還有321個字)
首頁
上一頁
1
下一頁
尾頁