pooled_var: compute pooled variance

pooled_V2R Documentation

compute pooled variance

Description

following the documentation here: https://online.stat.psu.edu/stat500/lesson/7/7.3/7.3.1/7.3.1.1

Usage

pooled_V2(x)

pooled_V1(x)

compute_pooled(x, method = c("V1", "V2"))

poolvar(res1, config, method = c("V1", "V2"))

Arguments

x

data.frame

Value

data.frame

See Also

Other stats: INTERNAL_FUNCTIONS_BY_FAMILY, lfq_power_t_test_proteins(), lfq_power_t_test_quantiles(), lfq_power_t_test_quantiles_V2(), plot_stat_density(), plot_stat_density_median(), plot_stat_violin(), plot_stat_violin_median(), plot_stdv_vs_mean(), summarize_stats()

Other stats: INTERNAL_FUNCTIONS_BY_FAMILY, lfq_power_t_test_proteins(), lfq_power_t_test_quantiles(), lfq_power_t_test_quantiles_V2(), plot_stat_density(), plot_stat_density_median(), plot_stat_violin(), plot_stat_violin_median(), plot_stdv_vs_mean(), summarize_stats()

Examples


x <- data.frame(nrMeasured =c(1,2,2), var = c(3,4,4), meanAbundance = c(3,3,3))
x <- data.frame(nrMeasured =c(1,2,1,1), var = c(NA, 0.0370, NA, NA), meanAbundance = c(-1.94,-1.46,-1.87,-1.45) )
prolfqua:::pooled_V2(na.omit(x))
prolfqua:::pooled_V1(na.omit(x))
x <- x[1,, drop=FALSE]
x
na.omit(x)
prolfqua:::pooled_V2(na.omit(x))
x <- data.frame(nrMeasured =c(1,2,2), var = c(3,4,4), meanAbundance = c(3,3,3))
x <- data.frame(nrMeasured =c(1,2,1,1), var = c(NA, 0.0370, NA, NA), meanAbundance = c(-1.94,-1.46,-1.87,-1.45) )
compute_pooled(x)
compute_pooled(x, method = "V2")
#debug(compute_pooled)
y <- data.frame(dilution.=c("a","b","c"),
     nrReplicates = c(4,4,4), nrMeasured = c(0,0,1), sd =c(NA,NA,NA),
     var = c(NA,NA,NA),meanAbundance = c(NaN,NaN,NaN))
compute_pooled(y)
yb <- y |> dplyr::filter(nrMeasured > 1)

bb <- prolfqua::sim_lfq_data_peptide_config()
config <- bb$config
data <- bb$data

res1 <- summarize_stats(data, config)
pv <- poolvar(res1, config)
stopifnot(nrow(pv) == nrow(res1)/3)


wolski/prolfqua documentation built on Dec. 4, 2024, 11:18 p.m.