shk_grid_plots: Shrinkage contribution grid plots

shk_gridR Documentation

Shrinkage contribution grid plots

Description

These mirror eta_grid()/eta_vs_cov_grid(), but for the per-individual shrinkage contribution diagnostic (shk type columns, see derive_shk()/backfill_shk()) instead of the etas themselves.

Usage

shk_grid(
  xpdb,
  mapping = NULL,
  shkvar = NULL,
  drop_fixed = TRUE,
  title = "Shrinkage contribution correlations | @run",
  subtitle = "Based on @nind individuals",
  caption = "@dir",
  tag = NULL,
  pairs_opts,
  .problem,
  quiet,
  ...
)

shk_vs_cov_grid(
  xpdb,
  mapping = NULL,
  shkvar = NULL,
  cols = NULL,
  covvar = NULL,
  covtypes = c("cont", "cat"),
  show_n = TRUE,
  drop_fixed = TRUE,
  title = "Shrinkage contribution covariate correlations | @run",
  subtitle = "Based on @nind individuals",
  caption = "@dir",
  tag = NULL,
  shkcov = TRUE,
  pairs_opts,
  .problem,
  quiet,
  ...
)

Arguments

xpdb

<xp_xtras> or <xpose_data> object

mapping

ggplot2 style mapping

shkvar

tidyselect for shk variables

drop_fixed

As in xpose

title

Plot title

subtitle

Plot subtitle

caption

Plot caption

tag

Plot tag

pairs_opts

List of arguments to pass to ⁠_opts⁠. See <xplot_pairs>

.problem

Problem number

quiet

Silence extra debugging output

...

Passed to xplot_pairs

cols

tidyselect for covariates variables

covvar

For shk_vs_cov_grid only: an alias for cols (matching the covvar argument of shk_vs_contcov()/shk_vs_catcov()). If supplied (non-NULL), takes precedence over cols.

covtypes

Subset to specific covariate type?

show_n

Count the number of IDs in each category

shkcov

For shk_vs_cov_grid, shk are sorted after covariates to give an x orientation to covariate relationships.

Value

xp_tras_plot object

Examples



xpdb_shk <- backfill_shk(xpdb_x)
shk_grid(xpdb_shk)
shk_vs_cov_grid(xpdb_shk)


xpose.xtras documentation built on Sept. 1, 2026, 5:08 p.m.