Oz_incidencer: Estimate HIV incidence rate using "Osmond's" method

View source: R/numericFunctions.R

Oz_incidencerR Documentation

Estimate HIV incidence rate using "Osmond's" method

Description

Estimate HIV incidence rate (infections per person-year) as the simple ratio of the numbers of infections to the total imputed time at risk. Frequentist confidence intervals are computed by bootstrapping. Dates of infection are known only within intervals, and individual times-at-risk are imputed as the disease-free periods between sexual debut and either as uniformly distributed random dates between dates of sexual debut and diagnosis or as the midpoints between those dates.

Usage

Oz_incidencer(
  DF,
  x = NULL,
  left = NULL,
  right = NULL,
  surveyDate = NULL,
  debutDate = NULL,
  sweight = NULL,
  imputer = "random",
  reps = 1001L,
  ci.type = "bca",
  conf = 0.95,
  ...
)

Arguments

DF

A dataframe containing the disease indicator and an estimate of time at risk.

x

Character-valued name of the binary (0 = negative, 1 = positive) infection status indicator.

left

Character-valued name of the (class = ⁠"Date"⁠) variable for the earliest possble date of infection.

right

Character-valued name of the (class = ⁠"Date"⁠) variable for the latest possible date of infection.

surveyDate

Character-valued name of the (class = ⁠"Date"⁠) variable containing the interview dates.

debutDate

Character-valued name of the (class = ⁠"Date"⁠) variable containing the self-reported dates of sexual debut.

sweight

(Optional) Numeric survey sampling weights.

imputer

Character; either ⁠"random"⁠ (the default) or ⁠"midpoint"⁠ which specifies how the date of infection is imputed. With argument imputer = "random", an independently and identically uniformly distributed date of infection is imputed for each bootstrap replication. This is slow for reasonable numbers of bootstrap replications.

reps

Integer number of bootstrap replicates.

ci.type

Bootstrap confidence interval type; any subset of c("norm","basic", "stud", "perc", "bca"), or "all". The default is ⁠"bca"⁠, which may require large numbers of bootstrap replicates.

conf

Numeric confidence level for bootstrap intervals.

...

Additional arguments passed to boot or boot.ci

Value

A list containing:

⁠boot.res⁠

An object of class ⁠boot⁠ including the incidence rate estimate.

⁠boot.ci⁠

An object of class ⁠bootci⁠ containng the bootstrap confidence intervals.

⁠Call⁠

The function call.

Author(s)

Steve Gutreuter

References

Osmond DH, Page K, Wiley J, Garrett K, Sheppard HW, Moss AR, Schrager L, Winkelstein W. HIV infection in homosexual and bisexual men 18 to 29 years of age: The San Francisco Young Men's Health Study. American Journal of Public Health 1994;84(12):1933-1937.

Davison AC, Hinkley DV. Bootstrap Methods and Their Application, Chapter 5. Cambridge University Press; 1997.

See Also

boot boot.ci


sgutreuter/SGmisc documentation built on Aug. 25, 2024, 7:21 p.m.