compute_grouped_mean_sd
Description
computes a the mean and standard deviation of the dependent variable data in DV_col grouped by time and dose.
Usage
compute_grouped_mean_sd( data, dv_col, ntime_col, dose_col, group_col = NULL, reference_dose = NULL, conf_int = 0.95)
Arguments
Name | Description |
---|---|
data | a dataframe containing QT dataset |
dv_col | an unquoted column name of dependent variable |
ntime_col | an unquoted column name of the Time group |
dose_col | an unquoted column name dose group |
group_col | an unquoted column of optional grouping column |
reference_dose | an optional DOSE of reference measurements |
conf_int | confidence interval default 0.95 |
Returns
a dataframe of the dv averaged over the grouped time and dose
Examples
data <- preprocess(data) data <- dplyr::mutate(data, DOSEF = as.factor(DOSEF))
compute_grouped_mean_sd( data, deltaQTCF, NTLD, DOSE, reference_dose = 0 )
# A tibble: 30 × 17# Groups: time [15] time dose meanDV sdDV geomeanDV geosdDV n seDV CI_low CI_up group <dbl> <dbl> <dbl> <dbl> <lgl> <lgl> <int> <dbl> <dbl> <dbl> <chr> 1 0.5 0 -8.28 6.43 NA NA 22 1.37 -11.1 -5.42 0 2 0.5 120 -5.74 6.13 NA NA 21 1.34 -8.53 -2.95 120 3 1 0 -5.45 7.04 NA NA 22 1.50 -8.57 -2.33 0 4 1 120 -0.219 7.96 NA NA 21 1.74 -3.84 3.41 120 5 1.5 0 -5.46 6.77 NA NA 22 1.44 -8.46 -2.46 0 6 1.5 120 -4.08 8.27 NA NA 21 1.80 -7.84 -0.320 120 7 2 0 -2.39 5.21 NA NA 22 1.11 -4.70 -0.0797 0 8 2 120 1.56 8.43 NA NA 21 1.84 -2.28 5.40 120 9 2.5 0 -4.09 9.71 NA NA 22 2.07 -8.40 0.215 010 2.5 120 0.936 10.2 NA NA 21 2.23 -3.72 5.59 120# ℹ 20 more rows# ℹ 6 more variables: mean_delta_DV <dbl>, geomean_delta_DV <int>,# delta_SD <dbl>, delta_SE <dbl>, CI_low_delta <dbl>, CI_up_delta <dbl>