Re: [R] Percentile bootstrap for the median : error message

2022-01-08 Thread varin sacha via R-help
Dear John, Great, many thanks for your quick help. Best, SV Le samedi 8 janvier 2022, 19:09:39 UTC+1, Fox, John a écrit : Dear Sacha, Here's your corrected and cleaned-up code: > library(boot) > set.seed(123) > s <- rnorm(10,0,1) > (m <- median(s)) [1] 0.000946463 > med <- fu

Re: [R] Percentile bootstrap for the median : error message

2022-01-08 Thread Fox, John
Dear Sacha, Here's your corrected and cleaned-up code: > library(boot) > set.seed(123) > s <- rnorm(10,0,1) > (m <- median(s)) [1] 0.000946463 > med <- function(d,i) { + median(d[i, ]) + } > set.seed(456) > N <- 100 > n<-5 > out <- replicate(N, { + dat <- data.frame(sample(s,size=n))

Re: [R] Percentile bootstrap for the median : error message

2022-01-08 Thread Bert Gunter
I see no error message. Bert Gunter On Sat, Jan 8, 2022 at 9:04 AM varin sacha via R-help wrote: > Dear R-experts, > > Here below my R code for the percentile bootstrap confidence intervals > with an error message. > Is there a way to make my R code work ? > Many thanks for your help and time

[R] Percentile bootstrap for the median : error message

2022-01-08 Thread varin sacha via R-help
Dear R-experts, Here below my R code for the percentile bootstrap confidence intervals with an error message. Is there a way to make my R code work ? Many thanks for your help and time. library(boot) s=rnorm(10,0,1) (m<-median(s)) N <- 100 n<-