gamma_poisson_ppd: Title Poisson model of parameter theta, given gamma prior and...

Description Usage Arguments Value Examples

View source: R/gamma_poisson_ppd.R

Description

Title Poisson model of parameter theta, given gamma prior and the data. Sampling the posterior predictive distribution.

Usage

1
2
3
gamma_poisson_ppd(sample_size, gamma_a1, gamma_b1, y1, gamma_a2, gamma_b2,
  y2, confidence_interval = NULL, using_MCMC = FALSE,
  poisson_fitting_mean = NULL)

Arguments

sample_size

How many samples to produce.

gamma_a1

First parameter of theta1.

gamma_b1

Second parameter of theta1.

y1

Given data of the Possion distribution with gamma prior for the parameter theta1.

gamma_a2

First parameter of theta2.

gamma_b2

Second parameter of theta2.

y2

Given data of the Possion distribution with gamma prior for the parameter theta2.

confidence_interval

Confidence interval to be calculated.

using_MCMC

Whether to use MCMC to sampling the posterior predictive distribution.

poisson_fitting_mean

Some given parameter for Poisson distribution to be tested.

Value

Sampling of the posterior predictive distribution.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
gamma_poisson_ppd(sample_size = 5000, gamma_a1 = 2, gamma_b1 = 1, 
y1 = menchild30bach, gamma_a2 = 2, gamma_b2 = 1, 
y2 = menchild30nobach, using_MCMC = FALSE)

gamma_poisson_ppd(sample_size = 5000, gamma_a1 = 2, gamma_b1 = 1, 
y1 = menchild30bach, gamma_a2 = 2, gamma_b2 = 1, 
y2 = menchild30nobach, using_MCMC = TRUE)

gamma_poisson_ppd(sample_size = 5000, gamma_a1 = 2, gamma_b1 = 1, 
y1 = menchild30bach, gamma_a2 = 2, gamma_b2 = 1, 
y2 = menchild30nobach, confidence_interval = c(0.025, 0.975), 
using_MCMC = FALSE, poisson_fitting_mean = 1.4)

nathanxli/BayesPD documentation built on June 18, 2020, 4:38 a.m.