0

My instructor advised me to resample my p-values (many different tests each using a different predictor) as a better way to correct for multiple comparisons for measures that may be correlated. I have created a vector with all my p-values and tried to apply this in the Boot function of car, but it does not work.

pvalues1 <- c("0.186","0.123","0.417","0.025","0.558","0.032","0.360","0.022","0.232",
"0.243","0.675","0.283","0.443","0.251","0.822","0.506","0.803","0.357","0.608",
"0.128","0.536","0.150","0.691","0.132","0.861","0.689","0.475","0.125","0.496",
"0.158","0.476","0.153","0.318","0.099","0.356","0.012","0.543","0.028","0.331",
"0.011","0.951","0.311","0.544","0.186","0.192","0.810","0.202","0.447","0.823",
"0.997","0.657","0.517","0.345","0.427","0.857","0.578","0.233","0.0004","0.775",
"0.012","0.538","0.118","0.491","0.004","0.003","0.0005","0.011","0.007","0.148",
"0.083","0.003","0.002","0.837","0.345","0.466","0.015","0.184","0.023","0.680","0.017")

pvalues2 <- as.numeric(pvalues1)
output <- Boot(pvalues2, R=1999)

Any suggestion on how I can do this?

StupidWolf
  • 45,075
  • 17
  • 40
  • 72
user6121484
  • 143
  • 2
  • 15
  • What does "does not work" mean exactly? – MrFlick Jun 12 '17 at 20:33
  • It gives me an error message: Error: $ operator is invalid for atomic vectors So, I am not sure if this is the correct way to do it? Maybe I should not use the Boot function to resample p-values and there is another way? – user6121484 Jun 12 '17 at 20:45
  • I believe the `Boot()` function takes a regression object (output from `lm()` or `glm()` for example), not a vector. – Lucy Jun 13 '17 at 01:29
  • Ok, so that may explain the error. Do you know if there is a way to work with a list of p-values? – user6121484 Jun 13 '17 at 03:25

0 Answers0