demo: Demo Dataset

demoR Documentation

Demo Dataset

Description

A dataset containing example data for demonstration purposes.

Usage

data(demo)

Format

An rda object, with 450 observations and the following variables:

S

A vector of factor levels, representing the study memberships.

Z

A vector of factor levels, representing the group memberships.

X

A covariate matrix.

Y

An outcome matrix.

naturalGroupProp

The relative group prevalences of the larger natural population. Necessary only for FLEXOR weights; it should be skipped for IC and IGO weights.

groupNames

Disease subtype names "IDC" or "ILC"

Details

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.

See Also

balancing.weights for computing weights causal.estimate for estimating causal effects

Examples

# 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)



WMAP documentation built on Oct. 6, 2026, 1:07 a.m.