Skip to contents

This function calculates the contrast coefficients used to test for a quadratic relationship across treatment levels.

Usage

getQuadContrast(Data, Treatment)

Arguments

Data

A data frame containing the treatment variable

Treatment

The name of the treatment variable in the data frame

Value

A numeric vector of contrast coefficients for quadratic trend testing

Examples

test_data <- data.frame(Dose = factor(c(0, 1, 2, 3, 0, 1, 2, 3)))
getQuadContrast(test_data, "Dose")
#> [1]  1 -1 -1  1