| contr.TianXu | R Documentation |
A complex-valued contrast function for s^el levels based on powers of the s-th root of the unity
contr.TianXu(n, s = 2, contrasts = TRUE)
n |
integer or vector; either an integer number of levels of the factor for
which contrasts are created, which must be a a power of |
s |
positive integer, at least 2 |
contrasts |
logical; must be TRUE |
The function implements the complex-valued contrasts from
Tian and Xu (2022). Its sole use is the calculation of the
stratification pattern (also called space-filling pattern).
However, note that it is not used in function Spattern,
but only in the internal function Spattern_TianXu,
which yields exactly the same results as function Spattern.
The contrasts argument has been kept in order to be
prepared in case the model.matrix function gains the
ability to handle complex-valued contrasts.
The Tian and Xu contrasts are full-factorial-based contrasts
in the sense of Groemping (2023b). Function Spattern
uses a different type of full-factorial-based contrasts,
the full-factorial-based Helmert contrasts provided in function
contr.FFbHelmert.
contr.TianXu yields a matrix of complex-valued contrasts.
It can therefore NOT be used in function model.matrix
or in statistical modeling functions.
Groemping (2023b) Tian and Xu (2022)
## the same n can yield different contrasts for different s
contr.TianXu(16, 2)
contr.TianXu(16, 4)
round(contr.TianXu(16, 16), 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.