calculate_payouts: A function to calculate payouts for RICH economic games using...

View source: R/calculate_payouts.R

calculate_payoutsR Documentation

A function to calculate payouts for RICH economic games using the compiled edgelists

Description

This function allows you to quickly calculate payouts. See details below. Note that coins allocated to alters who do not themselves appear as focals are refunded to the donors.

Usage

calculate_payouts(
  path,
  pattern = ".jpg",
  start = 1,
  stop = 3,
  game = "GLR",
  GV = 1,
  LV = 0.5,
  KV = 1,
  RV = -4
)

Arguments

path

Full path to main folder.

pattern

File extension of photos. Should be ".jpg" or ".JPG".

start

Location of start of PID in file name. If files are saved as "XXX.jpg" for example, this is 1.

stop

Location of end of PID in file name. If files are saved as "XXX.jpg" for example, this is 3.

game

Indicates which game data will be used in payout calculations. All combinations of G for the giving/allocation game, L for the leaving/taking game, and R for the reduction/punishment game, are accepted: i.e., type "G", "L", "R", "GL", "GR", "LR", or "GLR".

GV

Value of coins used in giving game.

LV

Value of coins used in leaving game.

KV

Value of coins kept in reducing game.

RV

Value of punishment tokens used in reducing game. Should be negative.

Examples

## Not run: 
  calculate_payouts(path=path, pattern=".jpg", start=1, stop=3, 
                    game="GLR", GV=1, LV=0.5, KV=1, RV=-4)
                   
## End(Not run)

ctross/DieTryin documentation built on Sept. 8, 2024, 8:07 p.m.