I've been trying to get the pvalue of my samples from a bootstrap rsquared test in R. I'm not very good with statistics so could someone please take a look at my below code and point me in the right direction with regards to how I can extract the p-values per sample (basically input a Descriptor_Score value and output a p-value based on the bootstrap model)? If my understanding is incorrect, please let me know. This code is mostly from API.
# Bootstrap 95% CI for R-Squared library(boot) # function to obtain R-Squared from the data rsq <- function(formula, data, indices) { d <- data[indices,] # allows boot to select sample fit <- lm(formula, data=d) return(summary(fit)$r.square) } ###vdw beta bootstrap `results[b]_vdw` = boot(data=rescored_beta, statistic=rsq, R=10000, formula=Descriptor_Score~vdw) # get 95% confidence interval confb_vdw=boot.ci(`results[b]_vdw`) cib_vdw = confb_vdw$bca[ , c(4, 5)] Thanks! [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.