x1 = c(1,2,3,4,5)
x2 = c(6,7)
x = list(x1,x2)
# Pooled sample mean (default) by type "A" pooling
pooledEstimator(x)
pooledEstimator(x, "mean", "A") # same as the above
# Pooled sample mean by type "B" pooling
pooledEstimator(x, "mean", "B")
# Pooled sample sd by type "B" pooling
pooledEstimator(x, estimator="sd", pool="B")
Run the code above in your browser using DataLab