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

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

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))
#>   n.groups n df        sd   var       sdT  mean
#> 1        1 2  1 0.1923538 0.037 0.1923538 -1.46
prolfqua:::pooled_V1(na.omit(x))
#>   n.groups n df        sd       sdT   var  mean
#> 1        1 2  1 0.1923538 0.1923538 0.037 -1.46
x <- x[1,, drop=FALSE]
x
#>   nrMeasured var meanAbundance
#> 1          1  NA         -1.94
na.omit(x)
#> [1] nrMeasured    var           meanAbundance
#> <0 rows> (or 0-length row.names)
prolfqua:::pooled_V2(na.omit(x))
#>   n.groups n df sd var sdT mean
#> 1        0 0  0  0   0 NaN  NaN
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)
#>   n.groups n df        sd       sdT   var  mean meanAll nrMeasured
#> 1        1 2  1 0.1923538 0.1923538 0.037 -1.46  -1.636          5
compute_pooled(x, method = "V2")
#>   n.groups n df        sd   var       sdT  mean meanAll nrMeasured
#> 1        1 2  1 0.1923538 0.037 0.1923538 -1.46  -1.636          5
#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)
#>   n.groups n df  sd sdT var mean meanAll nrMeasured
#> 1        0 0  0 NaN NaN NaN  NaN     NaN          1
yb <- y |> dplyr::filter(nrMeasured > 1)

bb <- prolfqua::sim_lfq_data_peptide_config()
#> creating sampleName from fileName column
#> Warning: no nr_children column specified in the data, adding column nr_children and setting to 1.
#> completing cases
config <- bb$config
data <- bb$data

res1 <- summarize_stats(data, config)
#> [1] "group_"
#> completing cases
pv <- poolvar(res1, config)
stopifnot(nrow(pv) == nrow(res1)/3)