comparison_test_treatment_single: Performs between- or within-individual experiments comparing...

View source: R/experiments.R

comparison_test_treatment_singleR Documentation

Performs between- or within-individual experiments comparing melatonin suppression for treated and untreated subgroups at a single lux

Description

For a between-individual comparison, a t-test comparing the melatonin suppression level at a single lux is conducted on two subgroups (untreated and treated) comprising different sets of individuals.

Usage

comparison_test_treatment_single(
  is_between,
  lux,
  n,
  population_treated_df,
  is_treated_higher
)

Arguments

is_between

a Boolean indicating whether experiment is within or between type

lux

the lux value at which to conduct the comparison

n

number of individuals in sample

population_treated_df

a virtual population data frame with individual who have been treated and those who have been untreated (where treatment is indicated by a Boolean column named "treated")

is_treated_higher

Boolean indicating whether treated group has a higher response

Details

For a within-individual comparison, a paired t-test comparing the melatonin suppression level at a single lux level for a set of individuals before and after they are treated is conducted.

This function requires based an (ideally large) simulated population of individual dose-response data.

Value

a binary value indicating test success (if=1) or failure (if=0) to detect difference of correct sign


mellux-project/melluxdrc documentation built on March 25, 2022, 8:09 p.m.