confint.pash: Calculating confidence intervals for pash measures

Description Usage Arguments References Examples

Description

Calculating confidence intervals around pash measures for a given pash object.

Generic function.

Usage

1
2
3
4
## S3 method for class 'pash'
confint(object, population.size, N = 1000, pace.type = "all",
  shape.type = "all", q = 0.5, harmonized = TRUE, trace = TRUE,
  alpha = 0.05, bs.er = 0.25, jk.er = 0.1)

Arguments

object

Pash object.

population.size

The size of population for the constructed pash object. If not given then it will be read from the object.

N

Number of bootstrap replicates.

pace.type

Which pace measure should be returned (default "all")? Use "none" if you don't wat to return any pace measure. See GetPace for details.

shape.type

Which shape measure should be returned (default "all")? Use "none" if you don't wat to return any shape measure. See GetShape for details.

q

GetPace parameter. Quantile specification for age where q percent of the life-table population is still alive (defaults to median). See GetPace for details.

harmonized

GetShape parameter. Should the harmonized version of the shape measures be returned (default TRUE)? See GetShape for details.

trace

Logical indicating if to show summary of performed bootstrap.

alpha

Significance level.

bs.er

Maximal acceptable fraction of Bootstrap errors (error = a measure does not exists for a certain bootstrapped data).

js.er

Maximal acceptable fraction of JackKnife errors (error = a measure does not exists for a certain JackKnife cases).

References

Efron, B., & Tibshirani, R. J. (1993). An introduction to the bootstrap. New York: Chapman & Hall.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 

#Get a data
obj <- Inputlx(x = australia_10y$x, lx = australia_10y$lx,nax = australia_10y$nax, nx = australia_10y$nx, last_open = TRUE)

ci1 <- confint(object = obj, population.size = 1000, trace = TRUE)
print(ci1, CI.type = 'BCa')
print(ci1, CI.type = 'Percentile')

#Smaller population size, closed interval, only e0
obj <- Inputlx(x = australia_10y$x, lx = australia_10y$lx,nax = australia_10y$nax, last_open = FALSE) 
ci2 <- confint(object = obj, population.size = 300, shape.type = 'none', pace.type = 'e0', trace = TRUE)
ci2

# Very small population size  
### REMOVE THIS EXAMPLE ONCE THE ERROR IS CORRECTED
# There is a mistake in pash package. The linear extrapolation doesn't work for some sets with open last intervals.
obj <- Inputlx(x = australia_10y$x, lx = australia_10y$lx,nax = australia_10y$nax, nx = australia_10y$nx, last_open = TRUE)
ci3 <- confint(object = obj, population.size = 10, shape.type = 'none', trace = TRUE)


## End(Not run)

MaciejDanko/BootstrapLT documentation built on May 14, 2019, 2:40 p.m.