Skip to contents

corpair() marks predictor-dependent latent random-effect correlations. It is distinct from residual rho12 and from the corpairs() extractor. The Current support covers q=2 location-location models with matching labelled mu1/mu2 random intercepts: corpair(id, level = "group", block = "p", from = "mu1", to = "mu2") ~ x and corpair(species, level = "phylogenetic", block = "p", from = "mu1", to = "mu2") ~ ecology. Predictors must be constant within the grouping factor. Spatial corpair() regressions, location-scale corpair() regressions, scale-scale corpair() regressions, and q=4 corpair() regressions are not supported. The phylogenetic q=2 route uses a positive-definite two-field loading contract for the whole tree-coupled species block.

Usage

corpair(
  group,
  level = NULL,
  block = NULL,
  class = NULL,
  from = NULL,
  to = NULL
)

Arguments

group

Grouping factor for the latent covariance block.

level

Optional latent correlation level, such as "group", "phylogenetic", or "spatial".

block

Optional covariance-block label, such as "p".

class

Optional latent correlation class: "location-location", "location-scale", or "scale-scale". This is an extraction-oriented shorthand and does not select a q=4 correlation-regression model.

from, to

Optional endpoint-specific distributional parameters, such as "mu1" and "mu2" for the supported q=2 targets. Other endpoint combinations are not supported.

Value

A formula marker; never evaluated by users.

Examples

bf(corpair(id, level = "group", block = "p",
  from = "mu1", to = "mu2") ~ ecology)
#> <drm_formula>
#> corpair(id, level = "group", block = "p", from = "mu1", to = "mu2") ~ ecology

# fitted q=2 phylogenetic sibling
bf(corpair(species, level = "phylogenetic", block = "p",
  from = "mu1", to = "mu2") ~ ecology)
#> <drm_formula>
#> corpair(species, level = "phylogenetic", block = "p", from = "mu1", to = "mu2")
#> ~ ecology