Learn R Programming

MAICtools (version 0.1.1)

estimate_ess: Estimate Effective Sample Size (ESS)

Description

Estimate Effective Sample Size (ESS)

Value

A data frame containing effective sample size (ESS) after weighting.

Arguments

ipds_wts

A data frame containing individual patient data from the intervention study, with a column containing the estimated weights (derived using estimate_weights).

agds

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

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.

comparator.n

A The name of the subjects number column in the data frame specified by agds, e.g., comparator.n = N. The default is N.

wt.col

The name of the estimated weights column in the data frame specified by ipds_wts. The default is wt.

digits

Specify the number of decimal places for the output results.

Examples

Run this code
# \donttest{
ess <- estimate_ess(
  ipds_wts = pts, agds = AgD_bl,
  intervention.arm = TRT,
  comparator = STUDY, comparator.study = "Study XX-1", comparator.arm = TRT,
  comparator.n = N)
ess
# }

Run the code above in your browser using DataLab