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 npboottprm::nonparboot, stats::t.test. The confidence level is also used to set the alpha level to alpha = 1 - conf.level

...

Additional arguments passed to the npboottprm::nonparboot function.

Value

A list containing:

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)


[Package bootwar version 0.2.1 Index]