poly_contrast | R Documentation |
Create a polynomial contrast evaluated over a set of (orderable) factor levels.
poly_contrast(A, name, where = NULL, degree = 1, value_map = NULL)
A |
A formula describing the contrast. |
name |
A character string representing the name of the contrast. |
where |
An optional formula defining the subset over which the contrast is computed. |
degree |
An integer representing the degree of the polynomial (default: 1). |
value_map |
An optional list that maps between levels of a factor and a numeric value. |
A list containing the polynomial contrast specification.
pcon <- poly_contrast(~ time, name="poly_time_3", degree=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.