pis.fit.boots: Bootstrap estimates of the output in 'pis.fit'

Description Usage Arguments Value Author(s) See Also Examples

View source: R/postinfectious.R

Description

This function creates bootstrap estimates of the output of pis.fit by creating bootstrap samples

Usage

1
pis.fit.boots(data,postinfect=c("LN","WB","GM"),theta,n.boots=1000,collective=100)

Arguments

data

A data.frame containing at least 4 columns. The first two columns represent (1) the time between the symptom onset of the antecedent infection and post-infectious syndrome and (2) the incubation period distribution of the antecedent infection (only "LN", "WB" and "GM"). The last two columns refer to the parameters of the incubation period distribution of the antecedent infection; for "LN", they are meanlog and sdlog as in dlnorm; for "WB", they are shape and scale as in dweibull; for "GM", they are shape and rate as in dgamma.

postinfect

The incubation period distribution of the post-infectious disease. It can only be "LN", "WB" and "GM".

theta

Text input only and it is an R expression to be evaluated (i.e. eval) so as to create initial values used in optim. The reason behind this is to allow random numbers as the initial values in optimisation. See Examples.

n.boots

The number of bootstrap samples.

collective

The number of bootstrap samples to be estimated at once as the estimation process uses the apply function.

Value

Same as those in pis.fit.

Author(s)

Char Leung

See Also

pis.fit

Examples

1
2
3
4
5
6
7
S<-c(56,37,32,7,8,3,5)
S0<-c(2,1,3,1,1,1,3)
X<-S-S0
f0<-c(rep("LN",4),rep("WB",3))
phi<-matrix(c(rep(c(0,1),4),rep(c(1,2),3)),byrow=TRUE,ncol=2)
data<-data.frame(X,f0,phi)
pis.fit.boots(data,"LN",theta="c(runif(1,2,3),runif(1,0,1))",n.boots=20,collective=15)

postinfectious documentation built on May 1, 2019, 11:32 p.m.