pdiscp: Predictive distribution for a binomial sample with a discrete...

Description Usage Arguments Value Author(s) Examples

Description

Computes predictive distribution for number of successes of future binomial experiment with a discrete distribution for the proportion.

Usage

1
pdiscp(p, probs, n, s)

Arguments

p

vector of proportion values

probs

vector of probabilities

n

size of future binomial sample

s

vector of number of successes for future binomial experiment

Value

vector of predictive probabilities for the values in the vector s

Author(s)

Jim Albert

Examples

1
2
3
4
5
p=c(.1,.2,.3,.4,.5,.6,.7,.8,.9)
prob=c(0.05,0.10,0.10,0.15,0.20,0.15,0.10,0.10,0.05)
n=10
s=0:10
pdiscp(p,prob,n,s)

Example output

 [1] 0.03211473 0.06657051 0.09190545 0.11272071 0.12897176 0.13543368
 [7] 0.12897176 0.11272071 0.09190545 0.06657051 0.03211473

LearnBayes documentation built on May 1, 2019, 7:03 p.m.