score_keeper {bootwar} | R Documentation |
Calculate Scores and Effect Size
Description
This function computes the sum and mean of the player's and computer's values
and calculates the effect size based on the given mode (t
or pt
).
Usage
score_keeper(player_values, comp_values, mode)
Arguments
player_values |
A numeric vector representing the values of the player's cards. |
comp_values |
A numeric vector representing the values of the computer's cards. |
mode |
A character string representing the mode of the game, either 't' for independent t-test or 'pt' for paired t-test. |
Value
A list containing:
-
player_sum
: Sum of player's values. -
player_mean
: Mean of player's values. -
comp_sum
: Sum of computer's values. -
comp_mean
: Mean of computer's values. -
effect_size
: Calculated effect size based on the given mode.
Examples
# Calculate scores for a simple game
player_vals <- c(2.5, 3.0, 4.5)
comp_vals <- c(3.5, 2.0, 4.0)
scores <- score_keeper(player_vals, comp_vals, mode = "t")
[Package bootwar version 0.2.1 Index]