Skip to contents

Discretization of the numeric variables used in the VACS Index 1 and Dat'AIDS score

Usage

discrete_age_dataids(x)

discrete_age_vacs1(x)

discrete_cd4_dataids(x)

discrete_cd4_vacs1(x)

discrete_egfr_dataids(x)

discrete_egfr_vacs1(x)

discrete_fib4_vacs1(x)

discrete_hgb_vacs1(x)

discrete_hiv1rna_vacs1(x)

Arguments

x

Numeric variable to discretize.

Value

Factor.

Examples

data(dataids)
dataids_d<-
  data.frame(
    age = dataids$age,
    age_d = discrete_age_dataids(dataids$age),
    cd4 = dataids$cd4_count,
    cd4_d = discrete_cd4_dataids(dataids$cd4_count),
    egfr = dataids$egfr,
    egfr_d = discrete_egfr_dataids(dataids$egfr))
head(dataids_d)
#>   age age_d cd4 cd4_d egfr egfr_d
#> 1  62 60-64 550 >=500   70   >=60
#> 2  62 60-64 550 >=500   70   >=60
#> 3  62 60-64 550 >=500   70   >=60
#> 4  62 60-64 550 >=500   70   >=60
#> 5  62 60-64 550 >=500   70   >=60
#> 6  62 60-64 550 >=500   70   >=60

data(vacs2)
vacs2_d <-
  data.frame(
    age = vacs2$AGE,
    age_d = discrete_age_vacs1(vacs2$AGE),
    cd4 = vacs2$CD4,
    cd4_d = discrete_cd4_vacs1(vacs2$CD4),
    vl = 10^vacs2$VL_LOG,
    vl_d = discrete_hiv1rna_vacs1(10^vacs2$VL_LOG),
    egfr = vacs2$EGFR,
    egfr_d = discrete_egfr_vacs1(vacs2$EGFR),
    fib4 = vacs2$EGFR,
    fib4_d = discrete_fib4_vacs1(vacs2$FIB4),
    hgb = vacs2$HGB,
    hgb_d = discrete_fib4_vacs1(vacs2$HGB))
head(vacs2_d)
#>   age age_d  cd4   cd4_d           vl  vl_d egfr egfr_d fib4 fib4_d hgb  hgb_d
#> 1  75  >=65   10     <50 100000.00000 >=1e5    0    <30    0 >=3.25   9 >=3.25
#> 2  75  >=65 1000   >=500     19.95262  <500    0    <30    0 >=3.25   9 >=3.25
#> 3  52 60-64  435 350-499     50.11872  <500   90   >=60   90  <1.45  14 >=3.25
#> 4  30   <50  435 350-499     50.11872  <500   90   >=60   90  <1.45  14 >=3.25
#> 5  35   <50  435 350-499     50.11872  <500   90   >=60   90  <1.45  14 >=3.25
#> 6  40   <50  435 350-499     50.11872  <500   90   >=60   90  <1.45  14 >=3.25