Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Bootstrap Method
set.seed(5610) x <- rnorm(300,10,15) bootstrap <- function(B,data){ sam = B dat = data n = length(data) mean.vector = c() for( i in 1:sam){ a = sample(dat,n,replace = T) mean.vector[i] = mean(a) } hist(mean.vector,col = 'lightblue',freq = F,border = 'white') abline(v = mean(mean.vector), col = 'red3', lty = 2, lwd = 2) cat("\n The average estimate is: ", mean(mean.vector)) cat("\n Standard error: ", sqrt(var(mean.vector))) } mean(x) bootstrap(1000,x)
run
|
edit
|
history
|
help
0
regression
Sqrt - Bisection
first r program
hello world
AjusteNaoLinear11-02-21
test array compiler R
19-08-2020-JacobiSistemaEuler
AjusteNaoLinear
ex1
Predict the prices