Package 'SampleSizeProportions'

Title: Calculating Sample Size Requirements when Estimating the Difference Between Two Binomial Proportions
Description: Sample size requirements calculation using three different Bayesian criteria in the context of designing an experiment to estimate the difference between two binomial proportions. Functions for calculation of required sample sizes for the Average Length Criterion, the Average Coverage Criterion and the Worst Outcome Criterion in the context of binomial observations are provided. In all cases, estimation of the difference between two binomial proportions is considered. Functions for both the fully Bayesian and the mixed Bayesian/likelihood approaches are provided. For reference see Joseph L., du Berger R. and Bélisle P. (1997) <doi:10.1002/(sici)1097-0258(19970415)16:7%3C769::aid-sim495%3E3.0.co;2-v>.
Authors: Lawrence Joseph [aut], Patrick Bélisle [aut, cre], Roxane du Berger [aut]
Maintainer: Patrick Bélisle <[email protected]>
License: GPL (>= 2)
Version: 1.1.3
Built: 2024-12-16 06:37:02 UTC
Source: CRAN

Help Index


Bayesian Sample Size Determination for the Difference between Two Binomial Proportions

Description

Calculate sample sizes based on highest posterior density intervals when comparing two binomial proportions using three different Bayesian approaches.

Details

Package: SampleSizeProportions
Type: Package
Version: 1.1.3
Date: 2023-08-22
License: GLP (version 2 or later)
URL: http://www.medicine.mcgill.ca/epidemiology/Joseph/Methodological-Publications-Bayesian-Sample-Size.html

A set of R functions for calculating sample size requirements using three different Bayesian criteria in the context of designing an experiment to estimate the difference between two binomial proportions. Functions for calculation of required sample sizes for the Average Length Criterion, the Average Coverage Criterion and the Worst Outcome Criterion in the context of binomial observations are provided. In all cases, estimation of the difference between two binomial proportions is considered. Functions for both the fully Bayesian and the mixed Bayesian/likelihood approaches are provided.

See the related package SampleSizeMeans for Bayesian sample sizes calculations based on highest posterior density intervals for normal means
https://CRAN.R-project.org/package=SampleSizeMeans

Author(s)

Lawrence Joseph, Roxane du Berger and Patrick Bélisle
Maintainer: Patrick Bélisle [email protected]

References

Joseph L, du Berger R, and Bélisle P.
Bayesian and mixed Bayesian/likelihood criteria for sample size determination
Statistics in Medicine 1997;16(7):769-781.

See Also

propdiff.acc, propdiff.alc, propdiff.modwoc, propdiff.woc, propdiff.mblacc, propdiff.mblalc, propdiff.mblmodwoc, propdiff.mblwoc


Bayesian sample size determination for the difference between two binomial proportions using the Average Coverage Criterion

Description

The function propdiff.acc returns the required sample sizes to reach a given coverage probability on average for a posterior credible interval of fixed length for the difference between two binomial proportions.

Usage

propdiff.acc(len, c1, d1, c2, d2, level = 0.95, equal = TRUE, m = 10000, mcs = 3)

Arguments

len

The fixed length of the posterior credible interval for the difference between the two unknown proportions

c1

First prior parameter of the Beta density for the binomial proportion for the first population

d1

Second prior parameter of the Beta density for the binomial proportion for the first population

c2

First prior parameter of the Beta density for the binomial proportion for the second population

d2

Second prior parameter of the Beta density for the binomial proportion for the second population

level

The desired average coverage probability of the posterior credible interval (e.g., 0.95)

equal

logical. Whether or not the final group sizes (n1, n2) are forced to be equal:

when equal = TRUE, final sample sizes n1 = n2;
when equal = FALSE, final sample sizes (n1, n2) minimize the expected posterior variance given a total of n1+n2 observations
m

The number of points simulated from the preposterior distribution of the data. For each point, the probability coverage of the highest posterior density interval of fixed length len is estimated, in order to approximate the average coverage probability. Usually 10000 is sufficient, but one can increase this number at the expense of program running time.

mcs

The Maximum number of Consecutive Steps allowed in the same direction in the march towards the optimal sample size, before the result for the next upper/lower bound is cross-checked. In our experience, mcs = 3 is a good choice.

Details

Assume that a sample from each of two populations will be collected in order to estimate the difference between two independent binomial proportions. Assume that the proportions have prior information in the form of Beta(c1, d1) and Beta(c2, d2) densities in each population, respectively. The function propdiff.acc returns the required sample sizes to attain the desired average coverage probability level for the posterior credible interval of fixed length len for the difference between the two unknown proportions.

This function uses a fully Bayesian approach to sample size determination. Therefore, the desired coverages and lengths are only realized if the prior distributions input to the function are used for final inferences. Researchers preferring to use the data only for final inferences are encouraged to use the Mixed Bayesian/Likelihood version of the function.

Value

The required sample sizes (n1, n2) for each group given the inputs to the function.

Note

The sample sizes are calculated via Monte Carlo simulations, and therefore may vary from one call to the next.

Author(s)

Lawrence Joseph [email protected], Patrick Belisle and Roxane du Berger

References

Joseph L, du Berger R, and Belisle P.
Bayesian and mixed Bayesian/likelihood criteria for sample size determination
Statistics in Medicine 1997;16(7):769-781.

See Also

propdiff.alc, propdiff.modwoc, propdiff.woc, propdiff.mblacc, propdiff.mblalc, propdiff.mblmodwoc, propdiff.mblwoc

Examples

propdiff.acc(len=0.05, c1=3, d1=11, c2=11, d2=54)

Bayesian sample size determination for the difference between two binomial proportions using the Average Length Criterion

Description

The function propdiff.alc returns the required sample sizes to reach a given posterior credible interval length on average for a fixed coverage probability for the difference between two binomial proportions.

Usage

propdiff.alc(len, c1, d1, c2, d2, level = 0.95, equal = TRUE, m = 10000, mcs = 3)

Arguments

len

The desired average length of the posterior credible interval for the difference between the two unknown proportions

c1

First prior parameter of the Beta density for the binomial proportion for the first population

d1

Second prior parameter of the Beta density for the binomial proportion for the first population

c2

First prior parameter of the Beta density for the binomial proportion for the second population

d2

Second prior parameter of the Beta density for the binomial proportion for the second population

level

The fixed coverage probability of the posterior credible interval (e.g., 0.95)

equal

logical. Whether or not the final group sizes (n1, n2) are forced to be equal:

when equal = TRUE, final sample sizes n1 = n2;
when equal = FALSE, final sample sizes (n1, n2) minimize the expected posterior variance given a total of n1+n2 observations
m

The number of points simulated from the preposterior distribution of the data. For each point, the length of the highest posterior density interval of fixed coverage probability level is estimated, in order to approximate the average length. Usually 10000 is sufficient, but one can increase this number at the expense of program running time.

mcs

The Maximum number of Consecutive Steps allowed in the same direction in the march towards the optimal sample size, before the result for the next upper/lower bound is cross-checked. In our experience, mcs = 3 is a good choice.

Details

Assume that a sample from each of two populations will be collected in order to estimate the difference between two independent binomial proportions. Assume that the proportions have prior information in the form of Beta(c1, d1) and Beta(c2, d2) densities in each population, respectively. The function propdiff.alc returns the required sample sizes to attain the desired average length len for the posterior credible interval of fixed coverage probability level for the difference between the two unknown proportions.

This function uses a fully Bayesian approach to sample size determination. Therefore, the desired coverages and lengths are only realized if the prior distributions input to the function are used for final inferences. Researchers preferring to use the data only for final inferences are encouraged to use the Mixed Bayesian/Likelihood version of the function.

Value

The required sample sizes (n1, n2) for each group given the inputs to the function.

Note

The sample sizes are calculated via Monte Carlo simulations, and therefore may vary from one call to the next.

Author(s)

Lawrence Joseph [email protected], Patrick Bélisle and Roxane du Berger

References

Joseph L, du Berger R, and Bélisle P.
Bayesian and mixed Bayesian/likelihood criteria for sample size determination
Statistics in Medicine 1997;16(7):769-781.

See Also

propdiff.acc, propdiff.modwoc, propdiff.woc, propdiff.mblacc, propdiff.mblalc, propdiff.mblmodwoc, propdiff.mblwoc

Examples

propdiff.alc(len=0.05, c1=3, d1=11, c2=11, d2=54)

Frequentist sample size determination for the difference between two binomial proportions

Description

The function propdiff.freq returns the required sample sizes to obtain a confidence interval of given length and confidence level for the difference between two binomial proportions.

Usage

propdiff.freq(len, p1.estimate, p2.estimate, level = 0.95)

Arguments

len

The desired total length of the confidence interval for the proportion

p1.estimate

A point estimate for the binomial proportion for the first population

p2.estimate

A point estimate for the binomial proportion for the second population

level

The desired level of the confidence interval (e.g., 0.95)

Details

Assume that a random sample from each of two populations will be collected in order to estimate the difference between two independent binomial proportions. Assume that the best point estimates for the unknown binomial proportions in the two populations are (p1.estimate, p2.estimate), respectively. The function propdiff.freq returns the required sample sizes to attain the desired length len and confidence level level for the confidence interval for the difference between the two unknown proportions from a frequentist point of view, using a normal approximation.

Value

The required sample sizes (n1, n2) for each group given the inputs to the function.

Author(s)

Lawrence Joseph [email protected], Patrick Bélisle and Roxane du Berger

References

Lemeshow S, Hosmer Jr DW, Klar J, Lwanga SK.
Adequacy of Sample Size in Health Studies. Wiley and Sons, New York, 1990.

Joseph L, du Berger R, and Bélisle P.
Bayesian and mixed Bayesian/likelihood criteria for sample size determination
Statistics in Medicine 1997;16(7):769-781.

See Also

propdiff.acc, propdiff.modwoc, propdiff.woc, propdiff.mblacc, propdiff.mblalc, propdiff.mblmodwoc, propdiff.mblwoc

Examples

propdiff.freq(len=0.01, p1.estimate=0.15, p2.estimate=0.20)

Bayesian sample size determination for the difference between two binomial proportions using the Mixed Bayesian/Likelihood Average Coverage Criterion

Description

The function propdiff.mblacc returns the required sample sizes to reach a given coverage probability on average for a posterior credible interval of fixed length using a mixed Bayesian/likelihood approach for the difference between two binomial proportions.

Usage

propdiff.mblacc(len, c1, d1, c2, d2, level = 0.95, m = 10000, mcs = 3)

Arguments

len

The fixed length of the posterior credible interval for the difference between the two unknown proportions

c1

First prior parameter of the Beta density for the binomial proportion for the first population

d1

Second prior parameter of the Beta density for the binomial proportion for the first population

c2

First prior parameter of the Beta density for the binomial proportion for the second population

d2

Second prior parameter of the Beta density for the binomial proportion for the second population

level

The desired average coverage probability of the posterior credible interval (e.g., 0.95)

m

The number of points simulated from the preposterior distribution of the data. For each point, the probability coverage of the highest posterior density interval of fixed length len is estimated, in order to approximate the average coverage probability. Usually 10000 is sufficient, but one can increase this number at the expense of program running time.

mcs

The Maximum number of Consecutive Steps allowed in the same direction in the march towards the optimal sample size, before the result for the next upper/lower bound is cross-checked. In our experience, mcs = 3 is a good choice.

Details

Assume that a sample from each of two populations will be collected in order to estimate the difference between two independent binomial proportions. Assume that the proportions have prior information in the form of Beta(c1, d1) and Beta(c2, d2) densities in each population, respectively. The function propdiff.mblacc returns the required sample sizes to attain the desired average coverage probability level for the posterior credible interval of fixed length len for the difference between the two unknown proportions.

This function uses a Mixed Bayesian/Likelihood (MBL) approach. MBL approaches use the prior information to derive the predictive distribution of the data, but use only the likelihood function for final inferences. This approach is intended to satisfy investigators who recognize that prior information is important for planning purposes but prefer to base final inferences only on the data.

Value

The required sample sizes (n1, n2) for each group given the inputs to the function.

Note

The sample sizes are calculated via Monte Carlo simulations, and therefore may vary from one call to the next.

Author(s)

Lawrence Joseph [email protected], Patrick Bélisle and Roxane du Berger

References

Joseph L, du Berger R, and Bélisle P.
Bayesian and mixed Bayesian/likelihood criteria for sample size determination
Statistics in Medicine 1997;16(7):769-781.

See Also

propdiff.mblalc, propdiff.mblmodwoc, propdiff.mblwoc, propdiff.acc, propdiff.alc, propdiff.modwoc, propdiff.woc

Examples

propdiff.mblacc(len=0.05, c1=3, d1=11, c2=11, d2=54)

Bayesian sample size determination for the difference between two binomial proportions using the Mixed Bayesian/Likelihood Average Length Criterion

Description

The function propdiff.mblalc returns the required sample sizes to reach a given posterior credible interval length on average for a fixed coverage probability using a mixed Bayesian/likelihood approach for the difference between two binomial proportions.

Usage

propdiff.mblalc(len, c1, d1, c2, d2, level = 0.95, m = 10000, mcs = 3)

Arguments

len

The desired average length of the posterior credible interval for the difference between the two unknown proportions

c1

First prior parameter of the Beta density for the binomial proportion for the first population

d1

Second prior parameter of the Beta density for the binomial proportion for the first population

c2

First prior parameter of the Beta density for the binomial proportion for the second population

d2

Second prior parameter of the Beta density for the binomial proportion for the second population

level

The fixed coverage probability of the posterior credible interval (e.g., 0.95)

m

The number of points simulated from the preposterior distribution of the data. For each point, the length of the highest posterior density interval of fixed coverage probability level is estimated, in order to approximate the average length. Usually 10000 is sufficient, but one can increase this number at the expense of program running time.

mcs

The Maximum number of Consecutive Steps allowed in the same direction in the march towards the optimal sample size, before the result for the next upper/lower bound is cross-checked. In our experience, mcs = 3 is a good choice.

Details

Assume that a sample from each of two populations will be collected in order to estimate the difference between two independent binomial proportions. Assume that the proportions have prior information in the form of Beta(c1, d1) and Beta(c2, d2) densities in each population, respectively. The function propdiff.mblalc returns the required sample sizes to attain the desired average length len for the posterior credible interval of fixed coverage probability level for the difference between the two unknown proportions.

This function uses a Mixed Bayesian/Likelihood (MBL) approach. MBL approaches use the prior information to derive the predictive distribution of the data, but use only the likelihood function for final inferences. This approach is intended to satisfy investigators who recognize that prior information is important for planning purposes but prefer to base final inferences only on the data.

Value

The required sample sizes (n1, n2) for each group given the inputs to the function.

Note

The sample sizes are calculated via Monte Carlo simulations, and therefore may vary from one call to the next.

Author(s)

Lawrence Joseph [email protected], Patrick Bélisle and Roxane du Berger

References

Joseph L, du Berger R, and Bélisle P.
Bayesian and mixed Bayesian/likelihood criteria for sample size determination
Statistics in Medicine 1997;16(7):769-781.

See Also

propdiff.mblacc, propdiff.mblmodwoc, propdiff.mblwoc, propdiff.acc, propdiff.alc, propdiff.modwoc, propdiff.woc

Examples

propdiff.mblalc(len=0.05, c1=3, d1=11, c2=11, d2=54)

Bayesian sample size determination for the difference between two binomial proportions using the Mixed Bayesian/Likelihood Modified Worst Outcome Criterion

Description

The function propdiff.mblmodwoc uses a mixed Bayesian/likelihood approach to determine conservative sample sizes for the difference between two binomial proportions, in the sense that the desired posterior credible interval coverage and length are guaranteed over a given proportion of data sets that can arise according to the prior information.

Usage

propdiff.mblmodwoc(len, c1, d1, c2, d2, level = 0.95, worst.level = 0.95)

Arguments

len

The desired total length of the posterior credible interval for the difference between the two unknown proportions

c1

First prior parameter of the Beta density for the binomial proportion for the first population

d1

Second prior parameter of the Beta density for the binomial proportion for the first population

c2

First prior parameter of the Beta density for the binomial proportion for the second population

d2

Second prior parameter of the Beta density for the binomial proportion for the second population

level

The fixed coverage probability of the posterior credible interval (e.g., 0.95)

worst.level

The probability that the length of the posterior credible interval of fixed coverage probability level will be at most len

Details

Assume that a sample from each of two populations will be collected in order to estimate the difference between two independent binomial proportions. Assume that the proportions have prior information in the form of Beta(c1, d1) and Beta(c2, d2) densities in each population, respectively. The function propdiff.mblmodwoc returns the required sample sizes to attain the desired length len for the posterior credible interval of fixed coverage probability level for the difference between the two unknown proportions. The Modified Worst Outcome Criterion used is conservative, in the sense that the posterior credible interval length len is guaranteed over the worst.level proportion of all possible data sets that can arise according to the prior information, for a fixed coverage probability level.

This function uses a Mixed Bayesian/Likelihood (MBL) approach. MBL approaches use the prior information to derive the predictive distribution of the data, but uses only the likelihood function for final inferences. This approach is intended to satisfy investigators who recognize that prior information is important for planning purposes but prefer to base final inferences only on the data.

Value

The required sample sizes (n1, n2) for each group given the inputs to the function.

Note

The sample sizes returned by this function are exact.

It is also correct to state that the coverage probability of the posterior credible interval of fixed length len will be at least level with probability worst.level with the sample sizes returned.

Author(s)

Lawrence Joseph [email protected], Patrick Bélisle and Roxane du Berger

References

Joseph L, du Berger R, and Bélisle P.
Bayesian and mixed Bayesian/likelihood criteria for sample size determination
Statistics in Medicine 1997;16(7):769-781.

See Also

propdiff.mblacc, propdiff.mblalc, propdiff.mblwoc, propdiff.acc, propdiff.alc, propdiff.modwoc, propdiff.woc

Examples

propdiff.mblmodwoc(len=0.05, c1=3, d1=11, c2=11, d2=54, worst.level=0.95)

Bayesian sample size determination for the difference between two binomial proportions using the Mixed Bayesian/Likelihood Worst Outcome Criterion

Description

The function propdiff.mblwoc uses a mixed Bayesian/likelihood approach to determine conservative sample sizes for the difference between two binomial proportions, in the sense that the desired posterior credible interval coverage and length are guaranteed over all possible data sets.

Usage

propdiff.mblwoc(len, c1, d1, c2, d2, level = 0.95)

Arguments

len

The desired length of the posterior credible interval for the difference between the two unknown proportions

c1

First prior parameter of the Beta density for the binomial proportion for the first population

d1

Second prior parameter of the Beta density for the binomial proportion for the first population

c2

First prior parameter of the Beta density for the binomial proportion for the second population

d2

Second prior parameter of the Beta density for the binomial proportion for the second population

level

The fixed coverage probability of the posterior credible interval (e.g., 0.95)

Details

Assume that a sample from each of two populations will be collected in order to estimate the difference between two independent binomial proportions. Assume that the proportions have prior information in the form of Beta(c1, d1) and Beta(c2, d2) densities in each population, respectively. The function propdiff.mblwoc returns the required sample sizes to attain the desired length len for the posterior credible interval of fixed coverage probability level for the difference between the two unknown proportions. The Worst Outcome Criterion used is conservative, in the sense that the posterior credible interval length len is guaranteed over all possible data sets that can arise, for a fixed coverage probability level.

This function uses a Mixed Bayesian/Likelihood (MBL) approach. MBL approaches use the prior information to derive the predictive distribution of the data, but uses only the likelihood function for final inferences. This approach is intended to satisfy investigators who recognize that prior information is important for planning purposes but prefer to base final inferences only on the data.

Value

The required sample sizes (n1, n2) for each group given the inputs to the function.

Note

The sample sizes returned by this function are exact.

It is also correct to state that the coverage probability of the posterior credible interval of fixed length len will be at least level with the sample sizes returned.

Author(s)

Lawrence Joseph [email protected], Patrick Bélisle and Roxane du Berger

References

Joseph L, du Berger R, and Bélisle P.
Bayesian and mixed Bayesian/likelihood criteria for sample size determination
Statistics in Medicine 1997;16(7):769-781.

See Also

propdiff.mblacc, propdiff.mblalc, propdiff.mblmodwoc, propdiff.acc, propdiff.alc, propdiff.modwoc, propdiff.woc

Examples

propdiff.mblwoc(len=0.05, c1=3, d1=11, c2=11, d2=54)

Bayesian sample size determination for the difference between two binomial proportions using the Modified Worst Outcome Criterion

Description

The function propdiff.modwoc calculates conservative sample sizes for the difference between two binomial proportions, in the sense that the desired posterior credible interval coverage and length are guaranteed over a given proportion of data sets that can arise according to the prior information.

Usage

propdiff.modwoc(len, c1, d1, c2, d2, level = 0.95, worst.level = 0.95, equal = TRUE)

Arguments

len

The desired length of the posterior credible interval for the difference between the two unknown proportions

c1

First parameter of the Beta prior density for the binomial proportion for the first population

d1

Second parameter of the Beta prior density for the binomial proportion for the first population

c2

First parameter of the Beta prior density for the binomial proportion for the second population

d2

Second parameter of the Beta prior density for the binomial proportion for the second population

level

The fixed coverage probability of the posterior credible interval (e.g., 0.95)

worst.level

The probability that the length of the posterior credible interval of fixed coverage probability level will be at most len

equal

logical. Whether or not the final group sizes (n1, n2) are forced to be equal:

when equal = TRUE, final sample sizes n1 = n2;
when equal = FALSE, final sample sizes (n1, n2) minimize the expected posterior variance given a total of n1+n2 observations

Details

Assume that a sample from each of two populations will be collected in order to estimate the difference between two independent binomial proportions. Assume that the proportions have prior information in the form of Beta(c1, d1) and Beta(c2, d2) densities in each population, respectively. The function propdiff.modwoc returns the required sample sizes to attain the desired length len for the posterior credible interval of fixed coverage probability level for the difference between the two unknown proportions. The Modified Worst Outcome Criterion used is conservative, in the sense that the posterior credible interval length len is guaranteed over the worst.level proportion of all possible data sets that can arise according to the prior information, for a fixed coverage probability level.

This function uses a fully Bayesian approach to sample size determination. Therefore, the desired coverages and lengths are only realized if the prior distributions input to the function are used for final inferences. Researchers preferring to use the data only for final inferences are encouraged to use the Mixed Bayesian/Likelihood version of the function.

Value

The required sample sizes (n1, n2) for each group given the inputs to the function.

Note

The sample sizes returned by this function are exact.

It is also correct to state that the coverage probability of the posterior credible interval of fixed length len will be at least level with probability worst.level with the sample sizes returned.

Author(s)

Lawrence Joseph [email protected], Patrick Bélisle and Roxane du Berger

References

Joseph L, du Berger R, and Bélisle P.
Bayesian and mixed Bayesian/likelihood criteria for sample size determination
Statistics in Medicine 1997;16(7):769-781.

See Also

propdiff.acc, propdiff.alc, propdiff.woc, propdiff.mblacc, propdiff.mblalc, propdiff.mblmodwoc, propdiff.mblwoc

Examples

propdiff.modwoc(len=0.05, c1=3, d1=11, c2=11, d2=54, worst.level=0.95)

Bayesian sample size determination for the difference between two binomial proportions using the Worst Outcome Criterion

Description

The function propdiff.woc calculates conservative sample sizes for the difference between two binomial proportions, in the sense that the desired posterior credible interval coverage and length are guaranteed over all possible data sets.

Usage

propdiff.woc(len, c1, d1, c2, d2, level = 0.95, equal = TRUE)

Arguments

len

The desired total length of the posterior credible interval for the difference between the two unknown proportions

c1

First parameter of the Beta prior density for the binomial proportion for the first population

d1

Second parameter of the Beta prior density for the binomial proportion for the first population

c2

First parameter of the Beta prior density for the binomial proportion for the second population

d2

Second parameter of the Beta prior density for the binomial proportion for the second population

level

The fixed coverage probability of the posterior credible interval (e.g., 0.95)

equal

logical. Whether or not the final group sizes (n1, n2) are forced to be equal:

when equal = TRUE, final sample sizes n1 = n2;
when equal = FALSE, final sample sizes (n1, n2) minimize the expected posterior variance given a total of n1+n2 observations

Details

Assume that a sample from each of two populations will be collected in order to estimate the difference between two independent binomial proportions. Assume that the proportions have prior information in the form of Beta(c1, d1) and Beta(c2, d2) densities in each population, respectively. The function propdiff.woc returns the required sample sizes to attain the desired length len for the posterior credible interval of fixed coverage probability level for the difference between the two unknown proportions. The Worst Outcome Criterion used is conservative, in the sense that the posterior credible interval length len is guaranteed over all possible data sets that can arise, for a fixed coverage probability level.

This function uses a fully Bayesian approach to sample size determination. Therefore, the desired coverages and lengths are only realized if the prior distributions input to the function are used for final inferences. Researchers preferring to use the data only for final inferences are encouraged to use the Mixed Bayesian/Likelihood version of the function.

Value

The required sample sizes (n1, n2) for each group given the inputs to the function.

Note

The sample sizes returned by this function are exact.

It is also correct to state that the coverage probability of the posterior credible interval of fixed length len will be at least level with the sample sizes returned.

Author(s)

Lawrence Joseph [email protected], Patrick Bélisle and Roxane du Berger

References

Joseph L, du Berger R, and Bélisle P.
Bayesian and mixed Bayesian/likelihood criteria for sample size determination
Statistics in Medicine 1997;16(7):769-781.

See Also

propdiff.acc, propdiff.alc, propdiff.modwoc, propdiff.mblacc, propdiff.mblalc, propdiff.mblmodwoc, propdiff.mblwoc

Examples

propdiff.woc(len=0.05, c1=3, d1=11, c2=11, d2=54)