comparison_test_single | R Documentation |
For a between-individual experiment, a t-test is used to compare the melatonin suppression level at two lux values for two different samples of individuals. This function requires based an (ideally large) simulated population of individual dose-response data.
comparison_test_single(is_between, lux_1, lux_2, n, population_df)
is_between |
a Boolean indicating whether experiment is within or between type |
lux_1 |
first measured lux value |
lux_2 |
second measured lux value |
n |
number of individuals in sample |
population_df |
a tibble representing a virtual experiment |
For a within-individual, a paired t-test is used to compare the melatonin suppression level at two lux values for a sample of individuals measured at each of those values. This function requires based an (ideally large) simulated population of individual dose-response data.
a named list comprising 'result': a binary value indicating test success (if=1) or failure (if=0) to detect difference of correct sign; and 'p_value': the p-value from the t test
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.