| pairwise_diff | R Documentation |
Construct contrasts for pairwise differences between parameters,
or apply these contrasts to an estimate object.
pairwise_diff(n, idx = NULL, reverse = FALSE)
n |
An integer giving the total number of parameters, or an
|
idx |
An integer vector of parameter indices to compare.
If |
reverse |
Logical; if |
When n is an integer, the function returns a contrast matrix with
n columns and one row for each pairwise comparison. If idx is
supplied, only pairs of parameters selected by idx are compared.
When n is an estimate object, the number of parameters is obtained
from length(coef(n)). The contrast matrix is applied to the object,
returning an estimate object containing the pairwise differences
and their propagated uncertainty.
A numeric contrast matrix if n is an integer, or an estimate
object if n is an estimate object.
pairwise_diff(4)
pairwise_diff(4, idx = c(1, 3, 4))
pairwise_diff(4, reverse = TRUE)
e <- estimate(coef = c(a = 1, b = 2, c = 4),
vcov = diag(3))
pairwise_diff(e)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.