% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Balance.R
\name{getGeneralizabilityTable}
\alias{getGeneralizabilityTable}
\title{Get information on generalizability}
\usage{
getGeneralizabilityTable(balance, baseSelection = "auto")
}
\arguments{
\item{balance}{A data frame created by the \code{computeCovariateBalance} function.}

\item{baseSelection}{The selection of the population to consider for generalizability.
Options are "auto", "target", "comparator", and "both". The "auto"
option will attempt to use the balance meta-data to pick the most
appropriate population based on the target estimator.}
}
\value{
A tibble with the following columns:
\itemize{
\item covariateId: The ID of the covariate. Can be linked to the \code{covariates} and \code{covariateRef}
tables in the \code{CohortMethodData} object.
\item covariateName: The name of the covariate.
\item beforeMatchingMean: The mean covariate value before any (propensity score) adjustment.
\item afterMatchingMean: The mean covariate value after any (propensity score) adjustment.
\item stdDiff: The standardized difference of means between before and after adjustment.
}

The tibble also has a 'baseSelection' attribute, documenting the base population used
to assess generalizability.
}
\description{
to assess generalizability we compare the distribution of covariates before and after
any (propensity score) adjustments. We compute the standardized difference of mean as
our metric of generalizability. (Lipton et al., 2017)

Depending on our target estimand, we need to consider a different base population for
generalizability. For example, if we aim to estimate the average treatment effect in
the treated (ATT), our base population should be the target population, meaning we
should consider the covariate distribution before and after PS adjustment in the target
population only. By default this function will attempt to select the right base
population based on what operations have been performed on the population. For example,
if PS matching has been performed we assume the target estimand is the ATT, and the
target population is selected as base.

Requires running \code{\link[=computeCovariateBalance]{computeCovariateBalance()}}` first.
}
\references{
Tipton E, Hallberg K, Hedges LV, Chan W (2017) Implications of Small Samples
for Generalization: Adjustments and Rules of Thumb, Eval Rev. Oct;41(5):472-505.
}
