Skip to contents

SEG risk category variables

Usage

seg_risk_cat_cols(df)

Arguments

df

data with BGM and REF columns

Value

seg risk category columns table

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_cat_cols(test_data)
#> # A tibble: 9,868 × 12
#>      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
#> # ℹ 5 more variables: abs_risk <dbl>, risk_cat <dbl>, ABSLB <dbl>, ABSUB <dbl>,
#> #   risk_cat_txt <chr>