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

make_phr_wt_summary_table(..., round = 2)

Arguments

...

ipw objects supplied as a list or as seperate arguments

round

The number of significant digits used for rounding means

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"))

make_phr_wt_summary_table(fit)
#> # A tibble: 22 × 5
#>    section             row     column                n cell_format
#>    <chr>               <chr>   <chr>             <dbl> <chr>      
#>  1 IPTCW main analysis Control "N"             3201    n          
#>  2 IPTCW main analysis Control "Min"              1.01 val        
#>  3 IPTCW main analysis Control "5th"              1.13 val        
#>  4 IPTCW main analysis Control "25th"             1.42 val        
#>  5 IPTCW main analysis Control "Median/\n50th"    1.95 val        
#>  6 IPTCW main analysis Control "75th"             3.32 val        
#>  7 IPTCW main analysis Control "95th"             8.4  val        
#>  8 IPTCW main analysis Control "Max"             76.6  val        
#>  9 IPTCW main analysis Control "Sum"           9954.   val        
#> 10 IPTCW main analysis Control "Mean"             3.11 val        
#> # … with 12 more rows