Hello.

How can I compute the Bootstrap p-value for a two-sided test problem like H_0: 
beta=0 vs. H_1: beta!=0 ?

Example for the sample mean:

x <- rnorm(100)

bootsample <- numeric(1000)

for(i in 1:1000) {

  idx <- sample(1:100,100,replace=TRUE)

  bootsample[i] <- mean(x[idx])

}


How can I compute the Bootstrap p-value for the mean of x?

H_0: "mean of x" = 0 vs. H_1: "mean of x" != 0



Thank you in advance.


Sincerely,
Andreas Klein.




______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to