Skip to contents

Extract concise, vignette-friendly tables from fitted shift-magnitude and distribution objects. These methods do not change the underlying objects; they only select and lightly round commonly inspected columns.

Usage

# S3 method for class 'shift_magnitude_comparison'
as.data.frame(
  x,
  row.names = NULL,
  optional = FALSE,
  component = c("summary", "tests", "modal", "ks"),
  analysis = NULL,
  digits = 4L,
  ...
)

# S3 method for class 'shift_magnitude_comparison_set'
as.data.frame(
  x,
  row.names = NULL,
  optional = FALSE,
  component = c("ks", "summary", "tests", "modal"),
  digits = 4L,
  ...
)

# S3 method for class 'shift_magnitude_counts'
as.data.frame(x, row.names = NULL, optional = FALSE, digits = 4L, ...)

# S3 method for class 'shift_magnitude_count_set'
as.data.frame(x, row.names = NULL, optional = FALSE, digits = 4L, ...)

# S3 method for class 'rate_distribution_fit'
as.data.frame(
  x,
  row.names = NULL,
  optional = FALSE,
  component = c("rankings", "parameters", "goodness"),
  models = NULL,
  n = Inf,
  digits = 4L,
  ...
)

# S3 method for class 'waiting_time_distribution_fit'
as.data.frame(
  x,
  row.names = NULL,
  optional = FALSE,
  component = c("rankings", "parameters", "lineage", "lineage_parameters"),
  models = NULL,
  n = Inf,
  digits = 4L,
  ...
)

Arguments

x

A shift_magnitude_comparison, shift_magnitude_comparison_set, shift_magnitude_counts, shift_magnitude_count_set, rate_distribution_fit, or waiting_time_distribution_fit object.

row.names, optional

Included for compatibility with base::as.data.frame(); ignored.

component

Summary table to extract. Ignored for shift-magnitude count objects. For shift-magnitude comparisons and comparison sets, use "summary", "tests", "modal", or "ks". For distribution fits, use "rankings" or "parameters"; rate-distribution fits with bootstrapped Gumbel diagnostics also support "goodness", which currently reports the Gumbel Kullback-Leibler divergence summary. For waiting-time fits with by_lineage = TRUE, use "lineage" or "lineage_parameters".

analysis

Optional label used when component = "ks" for shift_magnitude_comparison objects.

digits

Number of significant digits used for numeric columns.

...

Reserved for future extensions. Supplying unused arguments is an error.

models

Optional model identifiers used to filter parameter tables.

n

Maximum number of rows to return.

Value

A data.frame whose columns depend on component and the input class. Shift-magnitude summary tables report directional sample sizes and moments; test tables report the requested test statistics and p-values; modal tables report KDE modes and ratios; and component = "ks" returns one KS-focused row per comparison. Distribution-fit ranking tables report model information criteria, parameter tables report model parameters and estimates, Gumbel goodness tables report bootstrapped KL-divergence summaries, and waiting-time lineage tables report per-lineage fit summaries.