mdbystrata: Estimate mean difference Within Strata

View source: R/bystrataCoreFuns.R

mdbystrataR Documentation

Estimate mean difference Within Strata

Description

Estimates difference in means and significance within each formed strata

Usage

mdbystrata(yy, arm, treeStrata, termNodes = NULL, cilevel = 0.05,
  verbose = 0, alternative = "two.sided")

Arguments

yy

Continuous response vector

arm

Treatment indicator, 1 = test treatment, 0 = control

treeStrata

Vector of strata membership, as defined by ctree strata

termNodes

Vector of names for each tree strata formed (e.g., number of strata or covariate definition)

cilevel

Confidence level alpha for overall result and confidence intervals

verbose

Numeric variable indicating amount of information to print to the terminal (0 = nothing, 1 = notes only, 2 = notes and intermediate output)

treetype

String, whether trees input are "preliminary" or "final"

plot

Logical, whether to create risk difference forest plots

Value

  • fitsummary: summary of mean difference within each strata

  • table: Summary of amalgamated mean difference estimate, variance, p-value, and cilevelx100% confidence interval assuming sample size weights

  • weights: Sample size weights used to construct estimate


rmarceauwest/fiveSTAR documentation built on June 30, 2023, 7:38 a.m.