calculateContParams: Calculate the mean and variance of a quantitative variable in...

Description Usage Arguments Value Examples

View source: R/varFrac.R

Description

Calculate the mean and variance of a quantitative variable in a pooled sample of several cohorts

Usage

1

Arguments

N

is a vector of sample size in each cohorts

m

is a vector of the mean of the variable in each individual cohort

v

is a vector of the standard deviation of the variable in each individual cohorts

Value

A vector of length 2 which first element is the mean and second element is the variance

Examples

1
2
3
4
sample_sizes = c(250, 1000, 10000,7500)
means = c(2.5, 2.28, 2.32, 2.42)
sds = c(1.05,1.1, 0.98, 0.94)
parameters = calculateContParams(sample_sizes, means, sds)

vincela/VarExp documentation built on May 29, 2019, 12:42 p.m.