Learn R Programming

predint (version 2.2.1)

pi_rho_est: Estimation of the binomial proportion and the intra class correlation.

Description

pi_rho_est() estimates the overall binomial proportion \(\hat{\pi}\) and the intra class correlation \(\hat{\rho}\) of data that is assumed to follow the beta-binomial distribution. The estimation of \(\hat{\pi}\) and \(\hat{\rho}\) is done following the approach of Lui et al. 2000.

Usage

pi_rho_est(dat)

Value

a vector containing estimates for \(\pi\) and \(\rho\)

Arguments

dat

a data.frame with two columns (successes and failures)

References

Lui, K.-J., Mayer, J.A. and Eckhardt, L: Confidence intervals for the risk ratio under cluster sampling based on the beta-binomial model. Statistics in Medicine.2000;19:2933-2942. tools:::Rd_expr_doi("10.1002/1097-0258(20001115)19:21<2933::aid-sim591>3.0.CO;2-Q")

Examples

Run this code
# Estimates for bb_dat1
pi_rho_est(bb_dat1)

Run the code above in your browser using DataLab