BBS_mortality: Estimate Probability of Mortality Among Key Population...

View source: R/numericFunctions.R

BBS_mortalityR Documentation

Estimate Probability of Mortality Among Key Population Members

Description

BBS_mortality computes estimates of the probability of death over some time interval (determined by the survey questions) among members of key populations using information about contacts collected as part of Bio-Behavioral Surveillance Surveys. Estimation includes bootstrap confidence intervals.

Usage

BBS_mortality(
  .data,
  n_know = NULL,
  n_lost = NULL,
  n_died = NULL,
  degree = NULL,
  recall_max = 100,
  R = 2000L,
  conf = 0.95,
  ci_type = c("bca", "perc", "basic")
)

Arguments

.data

a dataframe containing the four variables.

n_know

a character string naming the variable containing the number of contacts known by the subject and who know the subject within the past time interval.

n_lost

a character string naming the variable containing the subset of n_know for whom the subject lost contact during the past time interval.

n_died

a character string naming the variable containing the subset of n_know who were known by the subject to have died, by any cause, during the past time interval.

degree

a character string naming the variable containing the network degree of the subject.

recall_max

the maximum contact count that is deemed plausible. Default: 100.

R

an integer-valued count of the number of bootstrap replicates desired for estimation of confidence limits. Default: 2000.

conf

the desired confidence level. Default: 0.95.

ci_type

a character string naming the type of bootstrap confidence interval desired; one of ⁠'bca'⁠ (default), ⁠'perc'⁠ or ⁠'basic'⁠. See boot.ci.

Details

BBS_mortality eliminates records for which n_know < n_lost + n_died and any observations containing missing values for those variables are also removed.

Value

A dataframe containing the following variables:

Pr_death

The estimated probability of mortality

SE

The standard error of the estimate

lower

The lower confidence limit

upper

The upper confidence limit

conf_level

The confidence level

type

The type of bootstrap confidence interval

Author(s)

Ian Fellows and Steve Gutreuter. Algorithm by Ian Fellows.


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