generate_preference_data: Generate potential outcomes if a participant were to receive...

View source: R/simulate_trial_model2.R

generate_preference_dataR Documentation

Generate potential outcomes if a participant were to receive each treatment

Description

Generate potential outcomes if a participant were to receive each treatment

Usage

generate_preference_data(
  n = 320,
  m = matrix(c(-3, -1, -1, -1, -2, 2, 0, 0, -2, 0, 2, 0, -1, 1, 1, 3), 4, 4),
  s = 10,
  p = c(0.2, 0.7, 0.05, 0.05)
)

Arguments

n

The number of participants

m

A matrix giving the mean response on each treatment (cols) by preference (rows)

s

The variability of response assumed constant across preferences/treatments

p

Distribution of preferences in the population


jatotterdell/mfittrial documentation built on Sept. 30, 2022, 12:23 p.m.