plot.dyadMLM_partner_check: Plot a saved partner-dependence check

View source: R/predictive_checks_dependence.R

plot.dyadMLM_partner_checkR Documentation

Plot a saved partner-dependence check

Description

[Experimental] Draws the comparison plots without repeating simulations.

Usage

## S3 method for class 'dyadMLM_partner_check'
plot(x, ask = NULL, panels = TRUE, ...)

Arguments

x

A dyadMLM_partner_check object.

ask

Whether to pause between figures on an interactive device. NULL (default) pauses when there is more than one figure, TRUE pauses and FALSE draws without pausing. File devices never pause.

panels

If TRUE (default), show each composition in one figure, with two rows and up to three columns. If FALSE, draw each statistic separately. Graphics settings are restored afterwards.

...

Additional graphical arguments passed to graphics::plot(). freq, xlim, main, and sub are controlled by this method.

Details

See check_partner_dependence() for interpretation, panel layouts, and technical details.

Value

Invisibly, x.

Examples


example_data <- prepare_dyad_data(
  dyads_cross[dyads_cross$coupleID <= 40, ],
  dyad = coupleID,
  member = personID,
  model_types = "none",
  seed = 123
)

model <- glmmTMB::glmmTMB(
  closeness ~ 1 +
    us(1 | coupleID) +
    us(0 + .member_contrast_arbitrary | coupleID),
  dispformula = ~ 0,
  data = example_data
)

simulations <- simulate_dyad_responses(
  model,
  nsim = 50,
  seed = 123
)

check <- check_partner_dependence(
  simulations,
  dyad = coupleID,
  role = gender,
  data = example_data,
  plot = FALSE
)

plot(check, ask = FALSE)


dyadMLM documentation built on Oct. 28, 2026, 1:06 a.m.