Create a dataset that can be used to produce a PHR extreme weights table

extreme_weights_phr(..., n = NULL, pct = NULL, digit = 3)

Arguments

...

ipw objects supplied as a list or as seperate arguments

n

The number of observations you wish to view

pct

The percentage of the total n from the table you wish to view

digit

Number of digits to round

Value

A tibble in the format for upload to a PHR using nswpr

Examples

models = specify_models(identify_treatment(Statin, formula = ~DxRisk ),
                        identify_censoring(EndofEnrollment, formula = ~DxRisk),
                        identify_outcome(Death))

fit = estimate_ipwrisk(example1, models,
                       times = seq(0,24,0.1),
                       labels = c("IPTCW main analysis"))

extreme_weights_phr(fit)
#> # A tibble: 200 × 5
#>    row   analysis            column          n       cell_format
#>    <chr> <chr>               <chr>           <chr>   <chr>      
#>  1 2424  IPTCW main analysis DxRisk          -2.2    numeric    
#>  2 2424  IPTCW main analysis Frailty         0.098   numeric    
#>  3 2424  IPTCW main analysis Sex             Male    factor     
#>  4 2424  IPTCW main analysis Statin          Control factor     
#>  5 2424  IPTCW main analysis StatinPotency   Control factor     
#>  6 2424  IPTCW main analysis EndofEnrollment NA      numeric    
#>  7 2424  IPTCW main analysis Death           9.242   numeric    
#>  8 2424  IPTCW main analysis Discon          0.1     numeric    
#>  9 2424  IPTCW main analysis CvdDeath        0       integer    
#> 10 2424  IPTCW main analysis conf_wt         76.642  numeric    
#> # … with 190 more rows