bootstrap_incidence: Calculates bootstrap variability estimates

Description Usage Arguments Examples

View source: R/incidence.R

Description

Calculates bootstrap variability estimates

Usage

1
2
3
bootstrap_incidence(incidence, nrep = 1000, rep_weights = NULL,
  type = c("BRR", "Fay", "JK1", "JKn", "bootstrap", "other"),
  combined_weights = TRUE, show_progress = TRUE, ...)

Arguments

incidence

a test_inc object returned by testing_incidence.

nrep

The number of bootstrap replications (ignored if rep_weights is not null.

rep_weights

A dataframe of replicate weights.

type

The type of resampling weights. See svrepdesign.

combined_weights

TRUE if the rep_weights already include the sampling weights. This is usually the case.

show_progress

If TRUE, prints bootstrap progress. This may also be a callback function taking one parameter equal to the index of the current replicate.

...

additional parameters to svrepdesign.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
  data(tstdat)
  tstdat$age <- rep(15:64, 200)


  inc <- with(tstdat, testing_incidence(report_pos, hiv,
                                        ever_test, last_test,
                                        biomarker_art=biomarker_art, low_viral=low_viral))

  # Simple random sample bootstrap with 5 replicates.
  bootstrap_incidence(inc,nrep=5, show_progress=FALSE)

fellstat/TestingHistoryIncidence documentation built on May 7, 2019, 7:41 a.m.