Learn R Programming

MAICtools (version 0.1.1)

estimate_weights: Functions for the Estimation of Propensity Weights

Description

Functions for the Estimation of Propensity Weights

Value

A data frame containing individual patient data, calculated weights, and rescaled weights.

Arguments

ipds

A data frame containing individual patient data from the intervention study, with baseline characteristic variables for matching.

agds

A data frame containing aggregate summary data from the comparator study.

matching.list

A character list with two elements giving the names of variables for matching: the first is a vector of binary variables, and the second is a vector of continuous variables. The variable names must match the column names in ipds and agds. Use c() if a type is absent.

intervention.arm

The name of the grouping column in the data frame specified by ipds, e.g., intervention.arm = TRT. The default is TRT.

comparator

The name of the study column in the data frame specified by agds, e.g., comparator = STUDY. The default is STUDY.

comparator.study

A character specifying the comparator study, which must be quoted and cannot be empty (e.g., comparator.study = "Study XX-1"). This is the value of the study column in agds set by the comparator parameter.

comparator.arm

The name of the grouping column in the data frame specified by agds, e.g., comparator.arm = TRT. The default is TRT.

opt.method

The optim method to be used. The default is "BFGS".

seed

The seed for centralized variable missing value imputation (KNN method).

...

Refer to optim for additional parameters.

Examples

Run this code
# \donttest{
cov <- list(
  c("ECOG", "SMK", "METBRAIN"),
  c("BMI", "DIAG")
)

pts <- estimate_weights(
  ipds = IPD,
  agds = AgD_bl,
  matching.list = cov,
  intervention.arm = TRT,
  comparator = STUDY,
  comparator.study = "Study XX-1",
  comparator.arm = TRT
)
# }

Run the code above in your browser using DataLab