README.md

npowerassignment

The goal of npowerassignment is to manage random assignment for the NPower RCT.

It manages the initialization of the experiment, assigning cohorts of participants, and logging their assignments.

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("context-dependent/npowerassignment")

Example

To initialize the experiment:

library(npowerassignment)
## basic example code

initialize_experiment(
  custom_parameters = list(
    minimum_list_size = 1000, 
    overall_treatment_probability = 0.5,
    minimum_treatment_probability = 0.2, 
    maximum_treatment_probability = 0.8, 
    eligible_locations = "Greater Toronto Area - GTA, ON", 
    eligible_programs = "Junior IT Analyst Program (JITA)",
    rep_target_gender_diversity = 0.5
  )
)

Assign a cohort of applicants:

applicants <- sample_cohort

assign_cohort(applicants)


context-dependent/npowerassignment documentation built on April 19, 2024, 2 a.m.