Skip to contents

Function to print or show a potential impact fraction object

Arguments

x

A pif_class

...

Additional arguments to pass to print or show.

accuracy

The accuracy of the printed value

Examples

my_pif <- pif(p = 0.2, beta = 1.3, var_beta = 0.1)
#> ! Assuming parameters `p` have no variance Use `var_p` to input their link_variances and/or covariance
print(my_pif)
#> 
#> ── Potential Impact Fraction ──
#> 
#> PIF = 5.660% [95% CI: -6.043% to 16.072%]
#> standard_deviation(pif %) = 5.629
#> standard_deviation(link(pif)) = 0.060

# Change the ammount of digits to show just 1
print(my_pif, accuracy = 0.1)
#> 
#> ── Potential Impact Fraction ──
#> 
#> PIF = 5.7% [95% CI: -6.0% to 16.1%]
#> standard_deviation(pif %) = 5.6
#> standard_deviation(link(pif)) = 0.1