Perform bootstrap estimation of confidence intervals of ranked HR scores
estimate.Rdestimate carries out estimation of bootstrap confidence intervals on
ranked score data. Returns a hrest object of the result
Proceeeds by calculating score ranks, then bootstrapping ranks in non-control
groups retaining the mean for each bootstrap iteration. Calculates
low and high quantiles of bootstrap mean distributions for each group.
If technical replicates are provided in a second grouping column these will
be averaged before proceeding.
Arguments
- df
data frame of score and group data. Contains minimally a score and group column
- ...
bare names of columns to use, minimally the score column and the group column in that order. Optionally a third technical replicate column can be provided
- control
the value of the grouping column taken to be the control group
- nits
the number of bootstap iterations to be done
- low
the low probability value of the quantile
- high
the high probability value of the quantile
Examples
d1 <- make_data()
estimate(d1, score, group)
#> besthr (HR Rank Score Analysis with Bootstrap Estimation)
#> =========================================================
#>
#> Control: A
#>
#> Unpaired mean rank difference of A (14.6, n=10) minus B (6.4, n=10)
#> 8.2
#> Confidence Intervals (0.025, 0.975)
#> 3.82375, 9.2575
#>
#> 100 bootstrap resamples.
d2 <- make_data2()
estimate(d2, score_column_name, sample_column_name, rep_column_name )
#> besthr (HR Rank Score Analysis with Bootstrap Estimation)
#> =========================================================
#>
#> Control: A
#>
#> Unpaired mean rank difference of A (5, n=3) minus B (2, n=3)
#> 3
#> Confidence Intervals (0.025, 0.975)
#> 1, 3
#>
#> 100 bootstrap resamples.
# \donttest{
d3 <- make_data3()
estimate(d3, score, sample, rep, nits = 1000)
#> besthr (HR Rank Score Analysis with Bootstrap Estimation)
#> =========================================================
#>
#> Control: A
#>
#> Unpaired mean rank difference of A (5, n=3) minus B (2, n=3)
#> 3
#> Confidence Intervals (0.025, 0.975)
#> 1, 3
#>
#> Unpaired mean rank difference of A (5, n=3) minus C (8, n=3)
#> -3
#> Confidence Intervals (0.025, 0.975)
#> 7, 9
#>
#> 1000 bootstrap resamples.
# }