Skip to contents

High Level API

Main functions for interactive use

Statistical Inference Layout definer and data preparation

Verbs that describe the model you want to analyze

define_model()
Define a layout supplied by a Variable Mapper
write_models()
Write multiple model definitions from a data frame

Variable Mapper IDs

Mappers similar to formula in R to shape the model you want to describe. Formula also allowed.

x_by() `%by%`
Compare a variable by group
rel()
Describe the relationship between two variables
pairwise()
Define all pairwise variable combinations
prop()
Define a proportion test model
on()
Specify variables for independent testing

Statistical Inference Parameterization

Verbs used for preparing and parameterize the equation of statistical inference

define_model()
Define a layout supplied by a Variable Mapper
prepare()
Prepare a lazy inference pipeline
prepare_test()
Lazily prepare a single test
prepare_model()
Lazily prepare a model inference
state_null()
State a null hypothesis in the pipeline
via()
Recalibrate the method variant
conclude()
Execute a lazy pipeline

"Population parameter" definer

Functions that emulate the population parameter, close to textbook notations

MU()
Mean of a variable, optionally conditioned on a subgroup
PI()
Proportion of a variable, optionally conditioned on a subgroup
RHO()
Population correlation between two variables

ANOVA for Linear Models

Verbs used to perform ANOVA for linear models

anova()
ANOVA table for linear model comparisons
write_models()
Write multiple model definitions from a data frame
prepare_model()
Lazily prepare a model inference

Output retriever and displayer

Verbs used to retrieve outputs in standard R’s data structure

tidy()
Tidy a concluded statistical result
display()
Display individual results

H-test container and executioner

Container and an eager executioner of a prepared H-test function

TTEST()
T-Test
CORTEST()
Correlation Test
P_TEST()
Proportion Test

Model-based inference container and executioner

Container and an eager executioner of a prepared model-based inference function

LINEAR_REG()
Linear regression
GLM()
Generalized linear model

Multiple Inline Codes

Analogue to I(), but only captures the expression and accepts multiple inline codes.

inlines()
Inline multiple expressions in a Variable Mapper

Output renderer and saver

Capture the printed output in specific formats

save_excel()
Save statistical output to Excel

Low-level / Developer facing API

Functions for building and extending test implementations

Model ID helpers

Classes and internal functions

var_id
Base class for Variable Mapper objects
model_processor()
Model evaluator
var_id_info()
Extract metadata from a Variable Mapper
class_var_inform
Output class for Variable Mapper metadata

Implementation containers

Declare how a test runs

agendas()
Collect implementations for a statistical procedure
baseline()
Declare the canonical implementation of a test or model
variant()
Declare an alternative implementation of a test or model

Base statistical inference output class

With different implementation but the same class, the methods, e.g. tidy(), will be shareable

class_stat_infer()
Base class for all statistical result objects
class_ttest_one
Structured result container for one-sample t-tests
class_ttest_two
Structured result container for two-sample t-tests
class_ttest_pairwise
Structured result container for pairwise t-tests
class_p_test
Structured result container for proportion tests
class_corr_two
Structured result container for two-sample t-tests
class_lm_object
Structured result container for linear model fits
class_glm_object
Structured result container for GLM fits

Test definition

Register a new test implementation

stat_define() test_define() model_infer_define()
Define a statistical procedure implementation
STAT_CONSTRUCTOR()
Main foundation for inferential statistics
HTEST_FN()
Build a hypothesis test function
MODEL_FN()
Build a model inference function

stat_define add-ons management

Add or remove estimation method on existing test functions

add_stat_define() remove_stat_define()
Add or remove stat_define implementations on a test or model function
purge_stat_defines()
Purge all package-scoped stat_define registrations for a package

Session-scoped variant management

Add or replace variants on existing test functions

add_variant() remove_variant()
Add or remove variant implementations on a test or model function
`%<-%`
Apply a method_tidy to a making_tidy target

Modelled hypothesis "population parameter" definer

Core class of "population parameter" definer

param_obj()
Base class for population parameters

Modelled hypothesis management and validators

Core helpers to parse the modelled hypotheses, objects from state_null()

validate_claim_vars() check_param_nodes() validate_one_param_node() check_x_and_given()
Validate hypothesis parameter references against a model's declared variables
claim_scalar()
Extract a scalar hypothesis value from a null claim
claim_contrast_coefs()
Extract contrast coefficients from a null claim

Modelled hypothesis translator and container

Core function to contain the implementation to translate modelled hypothesis, placed under claim_parser from baseline() / variant()

map_claim()
Build a claim parser from named resolver functions
baseline()
Declare the canonical implementation of a test or model
variant()
Declare an alternative implementation of a test or model

Tidy implementation container

Add or replace tidy() method for following STAT_CONSTRUCTOR objects

auto_tidy()
Automatically tidy a statistical result
making_tidy()
Declare tidy methods for a stat and model type
method_tidy()
Declare tidy methods for a stat result
`%<-%`
Apply a method_tidy to a making_tidy target