大家好
最近在上程式语言的课
教授请我们跑bootstrap
但不使用sample的function 而是自己写function
条件为
Create a function call my.sample with three arguments:
x:the data to be resampled
n:number of data points to sample
Replacement:resample with replacement or not
Only ‘runif’ ‘order’ and ‘if else’ statements are allowed
请问这要怎么撰写呢?
想破头还是想不出来