Using bootstrp for t-values

5 Ansichten (letzte 30 Tage)
Romi
Romi am 17 Mär. 2024
Beantwortet: Jeff Miller am 18 Mär. 2024
Hello,
Let's say my data includes N values.
I would like to perform boortapping in which each itteration calculates a t-test between one randomly sampled value and a randomly sampled sample of N-1 values.
Is it possible to use matlab's t-test function within the bootstrp function for this purpose?
Thank you,
Romi

Antworten (1)

Jeff Miller
Jeff Miller am 18 Mär. 2024
It depends on whether you want it to be possible that the "one randomly sampled value" is also present within the random sample of N-1 values (option 1), or if instead you want to make sure that the N-1 sample does not contain that one randomly sampled value (option 2).
bootstrp will be fine for option 1--just take the first datapoint in the bootstrap sample as the "one" value and the other N-1 as the remainder.
You couldn't use that method for option 2 because the first datapoint might also occur again later in the remaining N-1. You might look for a unique value in the bootstrap sample for this case, but that could introduce biases if there are some duplicates in your original full sample of N. And there might be no unique value at all in the bootstrap sample.
By the way, I can imagine doing this with either ttest or ttest2 in the boot function, depending on exactly what question you are trying to answer.

Produkte


Version

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by