Approximate information from a random samples of a given size for continuous and binary outcomes
Source:R/asymptotic_information.R
asymptotic_info.Rd
These functions provide an asymptotic approximation to the information (i.e. precision, inverse of the variance) provided by two samples under assumed values of nuisance parameters for continuous and binary outcomes.
Usage
asymptotic_information_difference_means(n_0, sigma_0, n_1, sigma_1)
asymptotic_information_difference_proportions(n_0, pi_0, n_1, pi_1)
Arguments
- n_0
Numeric vector containing the sample size in the control arm
- sigma_0
Variance of outcomes in the population of individuals receiving the control intervention
- n_1
Numeric vector containing the sample size in the treatment arm
- sigma_1
Variance of outcomes in the population of individuals receiving the active intervention
- pi_0
Probability of event in the population of individuals receiving the control intervention
- pi_1
Probability of event in the population of individuals receiving the control intervention
Value
When all parameters are scalars, the result is a scalar, indicating the approximate information. When multiple values are specified, a grid of unique parameters are constructed, and the approximate information is computed for each value of the parameters.
See also
asymptotic_information_mann_whitney_fm for ordinal outcomes.
Examples
# When a single value is supplied for each parameter, a scalar is returned:
asymptotic_information_difference_means(
n_0 = 50,
sigma_0 = 5,
n_1 = 50,
sigma_1 = 5
)
#> [1] 1
# When multiple values are supplied for one or more parameters, the grid of
# parameters are created, and a data.frame is returned.
asymptotic_information_difference_means(
n_0 = c(50, 75),
sigma_0 = 5,
n_1 = c(50, 75),
sigma_1 = 5
)
#> n_0 sigma_0 n_1 sigma_1 information_asymptotic
#> 1 50 5 50 5 1.0
#> 2 75 5 50 5 1.2
#> 3 50 5 75 5 1.2
#> 4 75 5 75 5 1.5