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

Description Usage Arguments Details Value

View source: R/experiments.R

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

1
2
3
4
5
6
7
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


melsuppr-power-project/chronodoseresponse documentation built on Feb. 25, 2022, 10:58 a.m.