samplesizeCMH

Power and Sample Size Calculation for the Cochran-Mantel-Haenszel Chi-Squared Test

https://github.com/pegeler/samplesizecmh

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.8%) to scientific vocabulary

Keywords

categorical-data cmh-test r r-package sample-size statistical-power statistics
Last synced: 6 months ago · JSON representation

Repository

Power and Sample Size Calculation for the Cochran-Mantel-Haenszel Chi-Squared Test

Basic Info
Statistics
  • Stars: 4
  • Watchers: 1
  • Forks: 4
  • Open Issues: 1
  • Releases: 0
Topics
categorical-data cmh-test r r-package sample-size statistical-power statistics
Created about 8 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog

README.md

samplesizeCMH: Sample Size Calculation for the Cochran-Mantel-Haenszel Test

CRAN\_version Number\_of\_Downloads

by Paul W. Egeler M.S.

Description

This package provides functions relating to power and sample size calculation for the CMH test. There are also several helper functions for interconverting probability, odds, relative risk, and odds ratio values.

Please see the package website for more information on how this package is used, including documentation and vignettes.

The Cochran Mantel Haenszel Test

The Cochran-Mantel-Haenszel test (CMH) is an inferential test for the association between two binary variables, while controlling for a third confounding nominal variable. Two variables of interest, X and Y, are compared at each level of the confounder variable Z and the results are combined, creating a common odds ratio. Essentially, the CMH test examines the weighted association of X and Y. The CMH test is a common technique in the field of biostatistics, where it is often used for case-control studies.

Sample Size Calculation

Given a target power which the researcher would like to achieve, a calculation can be performed in order to estimate the appropriate number of subjects for a study. The power.cmh.test function calculates the required number of subjects per group to achieve a specified power for a Cochran-Mantel-Haenszel test.

Power Calculation

Researchers interested in estimating the probability of detecting a true positive result from an inferential test must perform a power calculation using a known sample size, effect size, significance level, et cetera. The power.cmh.test function can compute the power of a CMH test, given parameters from the experiment.

Installation

Installation of the CRAN release can be done with install.packages(). From the R console:

r install.packages("samplesizeCMH")

Downloading and installing the latest version from GitHub is facilitated by remotes. To do so, type the following into your R console:

r if (!require("remotes")) install.packages("remotes") remotes::install_github("pegeler/samplesizeCMH")

Owner

  • Login: pegeler
  • Kind: user

Co-organizer of @WestMichiganRUserGroup and avid R user. Comments and posts on this site are my own and do not necessarily reflect the views of my employer.

GitHub Events

Total
  • Delete event: 1
  • Push event: 2
Last Year
  • Delete event: 1
  • Push event: 2

Packages

  • Total packages: 1
  • Total downloads:
    • cran 246 last-month
  • Total docker downloads: 11
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 2
  • Total maintainers: 1
cran.r-project.org: samplesizeCMH

Power and Sample Size Calculation for the Cochran-Mantel-Haenszel Test

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 246 Last month
  • Docker Downloads: 11
Rankings
Forks count: 12.2%
Average: 23.4%
Stargazers count: 23.6%
Dependent repos count: 23.8%
Docker downloads count: 25.1%
Downloads: 27.1%
Dependent packages count: 28.7%
Maintainers (1)
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.4.0 depends
  • stats * imports
  • DescTools * suggests
  • datasets * suggests
  • knitr * suggests
  • rmarkdown * suggests
  • testthat * suggests