process.standard.deviation: Compute replicate standard deviation with restrictions

Description Usage Arguments Details Value See Also Examples

View source: R/primary_analysis.R

Description

process.standard.deviation takes three replicates' data and combines vector-wise into standard deviations while allowing a single observation from each condition at most to be missing (flagged as NA).

Usage

1
2
3
4
5
6
process.standard.deviation(
  vec.rep1,
  vec.rep2,
  vec.rep3,
  use.sample.adjustment = TRUE
)

Arguments

vec.rep1

numeric vector of first replicate Ct data

vec.rep2

numeric vector of second replicate Ct data

vec.rep3

numeric vector of third replicate Ct data

use.sample.adjustment

boolean of whether to use sqrt(N - 1) biased sample adjustment

Details

There is an implicit restriction that appears to be applied manually to the real data example, where conditions with fewer than two replicates are blanked. Hopefully, this should cover that situation, while allowing single dropouts. Strangely, the existing excel template uses sample standard deviation for telomere data and population standard deviation for control data. I don't know why this is the case but it's emulated here for the moment.

Value

numeric vector of vector-wise averages, with NA exclusion criteria applied

See Also

process.average() for equivalent calculation with mean

Examples

1
vec.sd <- process.standard.deviation(rnorm(10), rnorm(10), rnorm(10))

NCI-CGR/cgrtelomeres documentation built on Feb. 11, 2021, 12:12 p.m.