estimate_ess: Estimate Effective Sample Size (ESS)

View source: R/estimate_ess.R

estimate_essR Documentation

Estimate Effective Sample Size (ESS)

Description

Estimate Effective Sample Size (ESS)

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.

Value

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

Examples


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



MAICtools documentation built on April 4, 2025, 12:17 a.m.