Estimate covariate means for population represented in nomatch() estimand
Source: R/summarize_nomatch_population.R
summarize_nomatch_population.RdEstimate covariate means for the weighted principal strata population
represented in nomatch() estimand. Since the principal strata populations
are not directly observed, simple summary statistics cannot be used. Instead,
the means are estimated as weighted means where the weights depend on
the both the original estimand weights and on
predicted probabilities of belonging to different principal strata.
Currently only implemented for the case when the estimand weights
represent the observed distribution of exposure days and covariates among the exposed.
Value
A data frame of the summary statistics with columns:
- variable
Covariate name
- label
Factor level label (empty string for numeric variables)
- mean
Mean (or weighted proportion for factor levels)
Examples
fit <- nomatch(
data = simdata,
outcome_time = "Y",
outcome_status = "event",
exposure = "V",
exposure_time = "D_obs",
covariates = c("x1", "x2"),
timepoints = seq(30, 180, by = 30),
immune_lag = 14
)
summarize_nomatch_population(simdata, fit)
#> variable label mean
#> 1 x1 0.5035969
#> 2 x2 8.0659550