Skip to contents

Use an explicit method identity, sidedness, confidence level and method-specific options. Method selection is never based on observed pretests.

Usage

method_spec(method_id, alternative = "two.sided", conf.level = 0.95,
  missing = "error", options = list(), engine = "base")
method_catalogue()
run_inference(spec, ..., result_id = NULL)

Arguments

method_id

An identity from method_catalogue().

alternative

Prespecified two.sided, less or greater alternative.

conf.level

Confidence level strictly between zero and one.

missing

Explicit error or omit policy, subject to each procedure's supported scope.

options

Uniquely named list of supported procedure settings. Unknown settings are errors.

engine

"base" (default) computes with infercalcR's own implementation. "reference" computes with the validated original package listed in the reference column of method_catalogue(); it is an error if that package is not installed, and no other engine is used instead. Methods whose test is computed by R's stats package, or whose model is fitted by stats or an optional model backend, have a single engine, which either value runs. The engine used is recorded in result_metadata(x)$engine.

spec

A method_spec.

result_id

Optional explicit stable identifier for joining distinct results.

...

Observations and design arguments for the selected method.

Value

A specification, capability data frame, or finalized common result respectively.

Examples

run_inference(method_spec("descriptive_summary"), data = data.frame(x = 1:5))
#> <descriptive> descriptive_summary
#>             row_id estimand estimate p.reported status
#>  description:1:1:1     mean 3.000000         NA     ok
#>  description:1:1:2       sd 1.581139         NA     ok
#>  description:1:1:3   median 3.000000         NA     ok
#>  description:1:1:4       q1 2.000000         NA     ok
#>  description:1:1:5       q3 4.000000         NA     ok
#>  description:1:1:6      min 1.000000         NA     ok
#>  description:1:1:7      max 5.000000         NA     ok