generate_session: Generate example session

Description Usage Arguments Value

View source: R/generate_example_data.R

Description

This function generates the example data of one participant.

Usage

1
2
3
4
5
6
7
8
9
generate_session(
  n_iteration,
  erotic_trial_size_per_participant,
  m0_prob,
  m1_prob,
  esp_user_percentage,
  chance_for_refuse_consent,
  chance_for_stopping_session
)

Arguments

erotic_trial_size_per_participant

number of erotic trials performed per participant

m0_prob

probability of successful guess if M0 is true

m1_prob

probability of successful guess among ESP-users in the simulated sample

esp_user_percentage

the percentage of ESP-users, or ESP-capable individuals in the population

chance_for_refuse_consent

chance of refusing consent or being excluded due to one of the eligibility criteria (e.g. underage)

chance_for_stopping_session

chance of stopping prematurely in each trial, to simulate some missing data due to unexpected events

Value

The function returns a dataframe containing the realistic example data of one participant. The returned dataframe has 22 variables and 1 to 41 rows depending on the results of the random probability functions.


marton-balazs-kovacs/tppr documentation built on Oct. 27, 2021, 3:04 p.m.