SEG risk columns (wrapper function)
seg_risk_vars.Rd
SEG risk columns (wrapper function)
Examples
test_data <- vroom::vroom(
system.file("extdata", "VanderbiltComplete.csv",
package = "segtools"), delim = ",")
#> Rows: 9891 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> dbl (2): BGM, REF
#>
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
seg_risk_vars(df = test_data)
#> # A tibble: 9,868 × 19
#> BGM REF bgm_pair_cat ref_pair_2cat included RiskPairID RiskFactor
#> <dbl> <dbl> <chr> <chr> <chr> <dbl> <dbl>
#> 1 121 127 BGM < REF NA Total included … 72849 0.00254
#> 2 212 223 BGM < REF NA Total included … 127636 0.0280
#> 3 161 166 BGM < REF NA Total included … 96928 0
#> 4 191 205 BGM < REF NA Total included … 114997 0.206
#> 5 189 210 BGM < REF NA Total included … 113800 0.209
#> 6 104 100 BGM > REF NA Total included … 62605 -0.125
#> 7 293 296 BGM < REF NA Total included … 176390 0
#> 8 130 142 BGM < REF NA Total included … 78273 0.267
#> 9 261 231 BGM > REF NA Total included … 157093 -0.285
#> 10 147 148 BGM < REF NA Total included … 88496 0
#> # ℹ 9,858 more rows
#> # ℹ 12 more variables: abs_risk <dbl>, risk_cat <dbl>, ABSLB <dbl>,
#> # ABSUB <dbl>, risk_cat_txt <chr>, rel_diff <dbl>, abs_rel_diff <dbl>,
#> # sq_rel_diff <dbl>, iso_diff <dbl>, iso_range <chr>, risk_grade <chr>,
#> # risk_grade_txt <chr>