analyze_game {bootwar} | R Documentation |
Analyze Game Results and Determine Winner
Description
This function analyzes the results of the game using both nonparametric bootstrap with pooled resampling and classical t-tests. It then determines the winner based on the bootstrap results and effect size.
Usage
analyze_game(plyr_vv, comp_vv, mode = "t", conf.level = 0.95, ...)
Arguments
plyr_vv |
A numeric vector storing the values of the cards dealt to the player. |
comp_vv |
A numeric vector storing the values of the cards dealt to the computer. |
mode |
A character string indicating the type of test. Valid options are "t" for independent t-test and "pt" for paired t-test. Default is "t". |
conf.level |
A confidence level for |
... |
Additional arguments passed to the |
Value
A list containing:
-
bootstrap_results
: A list containing results from the bootstrap test. -
classical_results
: A list containing results from the classical t-test. -
winner
: A character string indicating the winner ("Player Wins", "Computer Wins", or "Draw").
Examples
# Analyze a sample game
plyr_values <- c(4, 3, 2, 1)
comp_values <- c(1, 2, 3, 4)
game_results <- analyze_game(plyr_values, comp_values, nboot = 1000,
mode = "t", seed = 150)