summary.causal_model {CausalQueries}R Documentation

Summarizing causal models

Description

summary method for class "causal_model".

Usage

## S3 method for class 'causal_model'
summary(object, include = NULL, ...)

## S3 method for class 'summary.causal_model'
print(x, what = NULL, ...)

Arguments

object

An object of causal_model class produced using make_model or update_model.

include

A character string specifying the additional objects to include in summary. Defaults to NULL. See details for full list of available values.

...

Further arguments passed to or from other methods.

x

An object of summary.causal_model class, produced using summary.causal_model.

what

A character string specifying the objects summaries to print. Defaults to NULL printing causal statement, specification of nodal types and summary of model restrictions. See details for full list of available values.

Details

In addition to the default objects included in 'summary.causal_model' users can request additional objects via 'include' argument. Note that these additional objects can be large for complex models and can increase computing time. The 'include' argument can be a vector of any of the following additional objects:

print.summary.causal_model reports causal statement, full specification of nodal types and summary of model restrictions. By specifying 'what' argument users can instead print a custom summary of any set of the following objects contained in the 'summary.causal_model':

Value

Returns the object of class summary.causal_model that preserves the list structure of causal_model class and adds the following additional objects:

Examples


model <-
  make_model("X -> Y")

model |>
  update_model(
    keep_event_probabilities = TRUE,
    keep_fit = TRUE,
    data = make_data(model, n = 100)
  ) |>
  summary()



model <-
  make_model("X -> Y")

model <-
  model |>
  update_model(
    keep_event_probabilities = TRUE,
    keep_fit = TRUE,
    data = make_data(model, n = 100)
  )

print(summary(model), what = "type_posterior")
print(summary(model), what = "posterior_distribution")
print(summary(model), what = "posterior_event_probabilities")
print(summary(model), what = "data_types")
print(summary(model), what = "prior_hyperparameters")
print(summary(model), what = c("statement", "nodes"))
print(summary(model), what = "parameters_df")
print(summary(model), what = "posterior_event_probabilities")
print(summary(model), what = "posterior_distribution")
print(summary(model), what = "data")
print(summary(model), what = "stanfit")
print(summary(model), what = "type_posterior")

# Large objects have to be added to the summary before printing
print(summary(model, include = "ambiguities_matrix"),
  what = "ambiguities_matrix")



[Package CausalQueries version 1.4.3 Index]