ratediffbystrata: Estimate Risk Difference Within Strata

View source: R/bystrataCoreFuns.R

ratediffbystrataR Documentation

Estimate Risk Difference Within Strata

Description

Estimates risk difference and significance within each formed strata

Usage

ratediffbystrata(yy, arm, treeStrata, treetype = "final",
  termNodes = NULL, alternative = "two.sided", cilevel = 0.05,
  verbose = 0, plot = TRUE)

Arguments

yy

Case control status response vector

arm

Treatment indicator, 1 = test treatment, 0 = control

treeStrata

Vector of strata membership, as defined by ctree strata

treetype

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

termNodes

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

alternative

For tests, whether alternative hypothesis is "less", "greater", or "two.sided" (default = "two.sided")

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)

plot

Logical, whether to create risk difference forest plots

Value

  • fitsummary: summary of risk difference within each strata

  • table: Summary of amalgamated risk 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.