calcBeta: Calculate the needed value of beta to achieve a specified...

Description Usage Arguments Value

View source: R/calcBeta.R

Description

For the specified outcome regression, a value of beta must be specified as the log-odds ratio relating the treatment to the outcome. This beta will have a consequence on the true risk difference and thus beta must be calculated accordingly. It is not analytically tractable and thus we estimate it using simulation and the bisection method.

Usage

1
calcBeta(true_risk_diff, cov_dist, alpha_0_outcome, tol = 1e-04)

Arguments

true_risk_diff

The desired treated risk minus control risk

cov_dist

The covariate distribution. An integer 1-5 or one of the following: 'Ind Norm', 'Corr Norm', '5 Bern', '9 Bern', '10 Bern'

alpha_0_outcome

The calculated value alpha_0_outcome, obtained from calcAlpha0()

tol

The maximum difference between the upper and lower estimate

Value

The value of beta that corresponds to the desired risk difference for the given covariate distribution.


kkbrum/PSMOptimalCalipers documentation built on Dec. 21, 2021, 6:45 a.m.