Network Summaries

In network causal inference, methods often rely on summarizing the treatment and covariates of each unit's neighbors using some sort of summary function. For example, in a study evaluating the effect of electric vehicle adoption on air pollution, one might model the commuting patterns between counties as a network and evaluate the effect of the sum the number of electric vehicles commuting into each county. More information on when one might want to construct a CausalTable that features summary functions is featured in Turning Your Data Into a CausalTable.

This section documents all available summary measures and how to summarize them within a CausalTable.

Summarizing a CausalTable

Data wrapped in a CausalTable includes a NamedTuple summaries which describes extra variables represented as summary variables over the network. These summary measures can be computed and added to the table by calling the summarize function on the CausalTable object.

CausalTables.summarizeFunction
summarize(o::CausalTable)

Summarizes the data in a CausalTable object according to the NetworkSummary objects stored in its summaries attribute.

Arguments

  • o::CausalTable: The CausalTable object to be summarized.

Returns

  • A new CausalTable object with the original data merged with the summarized data.
source

Existing Summary Measures

The following lists summary measures currently available off-the-shelf in CausalTables.jl. Examples on their use are provided in Generating Data for Statistical Experiments and Turning data into a CausalTable.

CausalTables.SumType
Sum <: NetworkSummary

A NetworkSummary which sums the values of the target variable for each unit connected in the adjacency matrix of a StructuralCausalModel or CausalTable

Fields

  • target::Symbol: A key denoting the target variable to be summarized in the DataGeneratingProcess of the StructuralCausalModel; or, alternatively, the target variable to be summarized in the data attribute of a CausalTable.
  • matrix::Symbol: A key denoting the adjacency matrix over which summary is computed in the DataGeneratingProcess of the StructuralCausalModel; or, alternatively, the key of the adjacency matrix in the arrays attribute of a CausalTable.
  • weights::Union{Symbol, Nothing}: An optional variable by which each unit may be weighted in the summary.
source
CausalTables.MeanType
Mean <: NetworkSummary

A NetworkSummary which computes the mean of the target variable among each unit connected in the adjacency matrix.

Fields

  • target::Symbol: A key denoting the target variable to be summarized in the DataGeneratingProcess of the StructuralCausalModel; or, alternatively, the target variable to be summarized in the data attribute of a CausalTable.
  • matrix::Symbol: A key denoting the adjacency matrix over which summary is computed in the DataGeneratingProcess of the StructuralCausalModel; or, alternatively, the key of the adjacency matrix in the arrays attribute of a CausalTable.
  • weights::Union{Symbol, Nothing}: An optional variable by which each unit may be weighted in the summary.
source
CausalTables.AllOrderStatisticsType
AllOrderStatistics <: NetworkSummary

A NetworkSummary which computes all ordered values of the target variable among each unit's connected neighbors in the adjacency matrix.

Fields

  • target::Symbol: A key denoting the target variable to be summarized in the DataGeneratingProcess of the StructuralCausalModel; or, alternatively, the target variable to be summarized in the data attribute of a CausalTable.
  • matrix::Symbol: A key denoting the adjacency matrix over which summary is computed in the DataGeneratingProcess of the StructuralCausalModel; or, alternatively, the key of the adjacency matrix in the arrays attribute of a CausalTable.
  • weights::Union{Symbol, Nothing}: An optional variable by which each unit may be weighted in the summary.
source
CausalTables.KOrderStatisticsType
KOrderStatistics <: NetworkSummary

A NetworkSummary which computes the top K ordered values of the target variable among each unit's connected neighbors in the adjacency matrix.

Fields

  • target::Symbol: A key denoting the target variable to be summarized in the DataGeneratingProcess of the StructuralCausalModel; or, alternatively, the target variable to be summarized in the data attribute of a CausalTable.
  • matrix::Symbol: A key denoting the adjacency matrix over which summary is computed in the DataGeneratingProcess of the StructuralCausalModel; or, alternatively, the key of the adjacency matrix in the arrays attribute of a CausalTable.
  • weights::Union{Symbol, Nothing}: An optional variable by which each unit may be weighted in the summary.
source

Defining Your Own Summary Measures

Forthcoming.