pavit: Pool Adjacent Violator Algorithm

Description Usage Arguments Examples

Description

The PAVA algorithm proceeds by recursively checking monotone behavior and by pooling if necessary and finally stops if monotonicity is achieved.

Usage

1
pavit(pos,tot)

Arguments

pos

The amount of successes out of “tot” trials. These should be ordered by age.

tot

The amount of trials. These should be ordered by age.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Load Belgian B19 data
data("VZV_B19_BE_0103")
subset<-(VZV_B19_BE_0103$age>0.5)&(VZV_B19_BE_0103$age<76)&
  (!is.na(VZV_B19_BE_0103$age))&!is.na(VZV_B19_BE_0103$parvores)
VZV_B19_BE_0103<-VZV_B19_BE_0103[subset,]
y<-VZV_B19_BE_0103$parvores[order(VZV_B19_BE_0103$age)]
a<-VZV_B19_BE_0103$age[order(VZV_B19_BE_0103$age)]

neg<-table(y,round(a))[1,]
pos<-table(y,round(a))[2,]
tot<-neg+pos

pavit(pos=pos, tot=tot)

TeaKov/serostat documentation built on May 21, 2019, 1:21 p.m.