glmbystrata: Fit Linear or Logistic Regression GLM Model Within Strata

View source: R/bystrataCoreFuns.R

glmbystrataR Documentation

Fit Linear or Logistic Regression GLM Model Within Strata

Description

Fits a linear or logistic regression GLM model within each formed strata, providing estimate of regression coefficient or log odds ratio (EXPERIMENTAL!)

Usage

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

Arguments

yy

Continuous response or case control status response vector

arm

Treatment indicator, 1 = test treatment, 0 = control

family

Family for glm; options: "binomial" or "gaussian"

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)

Value

  • fitsummary: summary of GLM fits within each strata

  • table: Summary of amalgamated regression coefficient or odds ratio 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.