| demo | R Documentation |
A dataset containing example data for demonstration purposes.
data(demo)
An rda object, with 450 observations and the following variables:
A vector of factor levels, representing the study memberships.
A vector of factor levels, representing the group memberships.
A covariate matrix.
An outcome matrix.
The relative group prevalences of the larger natural population. Necessary only for FLEXOR weights; it should be skipped for IC and IGO weights.
Disease subtype names "IDC" or "ILC"
Demo Dataset for WMAP Examples
A demonstration dataset containing multi-site, multi-group observational data for testing WMAP weighting methods. The data simulates a study of breast cancer subtypes across mutliple hospitals.
balancing.weights for computing weights
causal.estimate for estimating causal effects
# Load the demo dataset
data(demo)
# Examine the structure
str(S) # Study memberships
str(Z) # Group memberships
table(S, Z) # Cross-tabulation of studies and groups
# Basic usage with IC method
weights <- balancing.weights(S, Z, X, method = "IC", naturalGroupProp)
summary(weights)
# Full causal analysis
results <- causal.estimate(S, Z, X, Y, B = 10, method = "IC", naturalGroupProp)
summary(results)
plot(results)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.