saviAnovaOneB: Safe Anytime-Valid One-Way Anova

View source: R/anova.R

saviAnovaOneBR Documentation

Safe Anytime-Valid One-Way Anova

Description

To compute equality of all means in K groups. Still in beta stage.

Usage

saviAnovaOneB(formula, data, subset, na.action, parameter, sigma = NULL, ...)

Arguments

formula

a formula of the form lhs ~ rhs where lhs is a numeric variable giving the data values and rhs a factor with at least two levels/groups.

data

a data frame (or similar: see model.frame()) containing the variables in the formula. By default the variables are taken from environment(formula).

subset

an optional vector specifying a subset of observations to be used.

na.action

a function which indicates what should happen when the data contain NAs. Defaults to getOption("na.action").

parameter

numeric > 0 representing the scaling the in the multivatiate Gaussian prior

sigma

numeric > 0 if a population standard deviation is assumed to be known. Default NULL to convey that the it is unknown.

...

further arguments to be passed to or from methods.

Value

a list

Examples

# Data
plantData <- data.frame(
  treatment = factor(rep(c("control", "fertiliserA", "fertiliserB"), each = 10)),
  height = c(
    c(12, 14, 11, 13, 12, 15, 13, 11, 14, 12), # Control group
    c(18, 20, 19, 22, 21, 20, 17, 19, 21, 23), # Fertiliser A group
    c(15, 17, 16, 15, 18, 14, 16, 17, 15, 16)  # Fertiliser B group
  )
)

saviAnovaOneB(height ~ treatment, data = plantData, parameter=1)

safestats documentation built on Oct. 5, 2026, 9:07 a.m.