minPadapHR: Estimate amalgamated treatment effect using minP approach

View source: R/bystrataCoreFuns.R

minPadapHRR Documentation

Estimate amalgamated treatment effect using minP approach

Description

Estimates overall treatment effect amalgamated from strata-level treatment effect estimates, using optimal weighting (i.e., using the the weighting scheme that gives the best test statistics/minimum p-value, between ni and ni/sqrt(Vi) weights), paying a minor penalty for taking the best of two correlated test statistics

Usage

minPadapHR(sf, betas, vars, cilevel, alternative = "less",
  vartype = "alt")

Arguments

sf

For survival traits, a survfit object containing information on number of subjects, number of events, number at risk, etc. for each strata, pooled across treatment assignment. For binary and continuous traits, a list of number of subjects per stratum, pooled across treatment assignment.

betas

Vector of estimated (log) treatment effect within each strata

vars

Vector of estimated variances of betas

cilevel

Significance level for adaptive weighted confidence intervals (i.e., (1-cilevel)x100% CIs for two-tailed tests, and (1-2*cilevel)x100% CIs for 1-tailed tests) (default = 0.025)

alternative

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

vartype

Whether stratum-level variances used to calculate the correlation between sample size and ni/sqrt(Vi) test statistics should be calculated under the null hypothesis ("null") or estimated via the fitted model under the alternative hypothesis ("alt", default). "null" variance may only be used when measure == "HR"

Value

  • adaptivewtRes: table of amalgamated (log) treatment effect estimate, variance, ci,and p-value using the optimal weight, as well as probability the treatment effect is in the desired direction

  • adaptivewts: weights used (e.g., ni or ni/sqrt(Vi))

  • calpha: adjusted critical value for test accounting for selecting the optimal weighting scheme

  • singlewtres: vector of Z-score test statistics and corresponding p-values for sample size weights, ni/sqrt(Vi) weights, and inverse variance weights (1/Vi; output for knowledge though not used in calculations)


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