Learn R Programming

prome (version 1.9.1.0)

PropHM: Bayesian Hierarchical Model for Information Borrowing for Proportions

Description

To compute the proportions of the subgroups assuming the subgroups follow the same binomial distribution with parameter p. The approach on partial pooling by Bob Carpenter has been used -- "Hierarchical Partial Pooling for Repeated Binary Trials" https://mc-stan.org/users/documentation/case-studies/pool-binary-trials.html

Usage

PropHM(x, n, kappa)

Value

  • `data`: data with estimates.

  • `alpha`: parameter of the beta distribution.

  • `beta`: parameter of the beta distribution.

Arguments

x

Numeric vector of events.

n

Numberic vector of group sample sizes.

kappa

kappa=alpha+beta>1. Must be given if the number of subgroups is 2.

Examples

Run this code
out <- PropHM(x=c(5,10,2),n=c(20,50,30))

Run the code above in your browser using DataLab