bspPosterior: Update a BSP prior with data and return a BSP posterior

Description Usage Arguments Value Examples

Description

Update a BSP prior with data and return a BSP posterior

Usage

1
bspPosterior(bspPriorObject, data, calculateMoments = TRUE)

Arguments

data

An nx2 matrix of data the first column are the actual data the second column contains the censoring variable 0 - if right censored 1 - if fully observed

calculateMoments

A flag to indicate whether second moments should be calculated. If the posterior is a component that will be merged with other components this should be TRUE; otherwise, setting to FALSE can save time.

bspPrior

The BSP object that defines the BSP prior

Value

An object representing a Beta-Stacy Process.

Examples

1
2
3
prior<-bsp(c(1,5),c(0.2,0.4),1)
data<-matrix(c(5,1,31,2,0), nrow=3, byrow=T)
bspPosterior(prior, data)

jntrcs/BnpSysRel documentation built on May 16, 2019, 9:09 p.m.