equiv_tost {ThermalSampleR}R Documentation

equiv_tost

Description

Perform a Test of Total Equivalence as adapted from Duffy et al. (2021) (<https://doi.org/10.1111/1365-2435.13928>)

Arguments

data

Data frame contains raw data. Must contain a column with a population identifier (e.g. population ID), and a column containing critical thermal limit data (e.g. temperatures at which critical limits are reached).

groups_col

Factor. Column containing the name of the population of interest (group ID)

groups_which

Character. Which population should be analysed?

response

Numeric. Column containing thermal limit data for individual samples

skews

Numeric. Vector containing skewness parameter(s). Defaults to 0, 1, 2, 10, 50.

equiv_margin

Numeric. Equivalence of subsets to full population CT estimate (unit = degree Celcius). Defaults to 1.

pop_n

Numeric. Size of population to sample (will test subsamples of size pop_n - x against pop_n for equivalence) Defaults to population size = 30

colrs

Character. Vector of colours for each skewness paramater value. E.g. if two skewness parameter values are set, choose two colours: colrs = c("blue", "red"). Defaults to "blue", "red", "orange", "forestgreen", "lightgrey".

Value

Two plots; (a) equivalence of means, and (b) equivalence of variances

Examples


head(coreid_data)
res <- equiv_tost(data = coreid_data,
                    groups_col = col,
                    groups_which = "Catorhintha schaffneri_APM",
                    response = response,
                    skews = c(1,10),
                    colrs = c("lightblue", "lightpink"),
                    equiv_margin = 1,
                    pop_n = 5)


[Package ThermalSampleR version 0.1.2 Index]