Package 'besthr'

Title: Generating Bootstrap Estimation Distributions of HR Data
Description: Creates plots showing scored HR experiments and plots of distribution of means of ranks of HR score from bootstrapping. Authors (2019) <doi:10.5281/zenodo.3374507>.
Authors: Dan MacLean [aut, cre]
Maintainer: Dan MacLean <[email protected]>
License: MIT + file LICENSE
Version: 0.3.2
Built: 2024-11-04 04:18:58 UTC
Source: https://github.com/cran/besthr

Help Index


Perform bootstrap estimation of confidence intervals of ranked HR scores

Description

estimate 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.

Usage

estimate(df, ..., control = "A", nits = 100, low = 0.025, high = 0.975)

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

Value

a list object of class "hrest"

Examples

d1 <- make_data()
 estimate(d1, score, group)

 d2 <- make_data2()
 estimate(d2, score_column_name, sample_column_name, rep_column_name )


 d3 <- make_data3()
 estimate(d3, score, sample, rep, nits = 1000)

return a sample data set of random values for two groups

Description

return a sample data set of random values for two groups

Usage

make_data()

Value

tibble of random values for two groups

Examples

d1 <- make_data()

return a sample data set of random values for two groups with three technical reps per group

Description

return a sample data set of random values for two groups with three technical reps per group

Usage

make_data2()

Value

tibble of random values for two groups with three technical reps per group

Examples

d2 <- make_data2()

return a sample data set of random values for three groups with three technical reps per group

Description

@examples

Usage

make_data3()

Details

d3 <- make_data3()

Value

tibble of random values for three groups with three technical reps per group


plots the hrest object

Description

returns a ggplot object representing the hrest object from estimate. The content of left panel varies according to the value of the which parameter. If which = "rank_simulation" is used a plot of rank score values will be plotted in the left panel. In this case technical replicates will be averaged if provided. If which = "just_data" a plot of scores only is created and technical replicates are displayed as is. In each case, the right hand panel shows the rank bootstrap distribution and confidence interval boundaries for all non- control groups.

Usage

## S3 method for class 'hrest'
plot(x, ..., which = "rank_simulation")

Arguments

x

the hrest object from estimate

...

Other parameters

which

the type of left hand panel to create. Either "rank_simulation" or "just_data"

Value

ggplot object

Examples

d1 <- make_data()
 hr_est <- estimate(d1, score, group)
 plot(hr_est)

print a summary of the hrest object

Description

print a summary of the hrest object

Usage

## S3 method for class 'hrest'
print(x, ...)

Arguments

x

hrest object

...

other parameters

Value

null

Examples

d1 <- make_data()
 hr_est <- estimate(d1, score, group)
 print(hr_est)