computeMdrr: Compute the minimum detectable relative risk

Description Usage Arguments Details Value References

View source: R/Power.R

Description

Compute the minimum detectable relative risk

Usage

1
2
3
4
5
6
7
computeMdrr(
  population,
  alpha = 0.05,
  power = 0.8,
  twoSided = TRUE,
  modelType = "cox"
)

Arguments

population

A data frame describing the study population as created using the createStudyPopulation function. This should at least have these columns: personSeqId, treatment, outcomeCount, timeAtRisk.

alpha

Type I error.

power

1 - beta, where beta is the type II error.

twoSided

Consider a two-sided test?

modelType

The type of outcome model that will be used. Possible values are "logistic", "poisson", or "cox". Currently only "cox" is supported.

Details

Compute the minimum detectable relative risk (MDRR) and expected standard error (SE) for a given study population, using the actual observed sample size and number of outcomes. Currently, only computations for Cox models are implemented. For Cox model, the computations by Schoenfeld (1983) is used.

Value

A data frame with the MDRR and some counts.

References

Schoenfeld DA (1983) Sample-size formula for the proportional-hazards regression model, Biometrics, 39(3), 499-503


escott12/CohortMethod documentation built on Dec. 20, 2021, 6:37 a.m.