update: Applying Bayes Rule

Description Usage Arguments Examples

Description

The Bayes rule is applied to an imprecise prior and produce an imprecise posterior.

Usage

1
2
3
4
## S3 method for class 'impinf'
update(object, y = NULL, wrt = c("canonical", "mean"), ...)

update2.impinf(object, y = NULL, ...)

Arguments

object

an object for which an update is needed

y

vector of observations

wrt

parameterization method with respect to canonical or mean

...

further arguments passed to methods

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# 2-dimensions
lc0 <- list(lhs=rbind(diag(2), -diag(2)), rhs=c(0,0,-1,-1))
op <- iprior(ui=rbind(diag(2), -diag(2)), ci=c(0,0,-1,-1)) 
op <- iprior(ui=rbind(c(1,0),c(0,1),c(-1,-1)), ci=c(0,0,-5)) 
op <- iprior(ui=rbind(c(1,0),c(0,1),c(0,-1),c(1,1),c(-2,-1)), 
             ci=c(1,2,-8,5,-14)) # (3,8),(1,8), (1,4),(3,2)(6,2)
op1 <- update(op, y=NULL)

# 3-dimensions
lc0 <- rbind(c(1,2,0), c(1,-2,0), c(0.5,-2,0), c(0.5,2,0)) 
op <- iprior(pmat=lc0)
op1 <- update(op, y=NULL)

imPois documentation built on May 30, 2017, 3:32 a.m.