trt.mean: Calculate the mean of a specific treatment's distribution.

Description Usage Arguments Value Examples

View source: R/vector_summary_stats.R

Description

Calculate the mean of a specific treatment's distribution.

Usage

1
trt.mean(x, y, ind)

Arguments

x

A categorical value (factor) with two levels.

y

A list of response values.

ind

The index of the specific treatment to return a mean for.

Value

Treatment mean.

Examples

1
2
3
4
5
y <- c(rnorm(20,mean=10,sd=2),rnorm(20,mean=25,sd=6))
x <- factor(c(rep('A',20),rep('B',20)))

trt.mean(x,y,1)
trt.mean(x,y,2)

ctkremer/priceTools documentation built on May 28, 2019, 7:49 p.m.