boot_two_groups: Bootstrap sampling for difference in means between two groups

Description Usage Arguments Value Examples

View source: R/function_boot_two_groups.R

Description

Calculate difference in mean CT limits between two groups.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
boot_two_groups(
  data,
  groups_col,
  n_max,
  n_min = 3,
  iter = 29,
  response,
  group1,
  group2
)

Arguments

data

Data frame contain raw data.

groups_col

Factor. Column containing names of two populations to compare

n_max

Numeric. Maximum sample size to extrapolate simulations.

n_min

Numeric. Minimum sample size to extrapolate simulations. Defaults to 3.

iter

Numeric. Number of bootstrap samples to draw. Defaults to 29.

response

Numeric. Column containing thermal limit data for individual samples.

group1

String. Name of first population to compare.

group2

String. Name of second population to compare.

Value

A data frame of bootstrap resamples

Examples

1
2
3
4
5
6
7
8
head(coreid_data)
sims <- boot_two_groups(data = coreid_data,
                        groups_col = col,
                        response = response,
                        group1 = "Catorhintha schaffneri_APM",
                        group2 = "Catorhintha schaffneri_NPM",
                        n_max = 49,
                        iter = 99)

guysutton/ThermalSampleR documentation built on Sept. 8, 2020, 12:07 a.m.