Learn R Programming

mosaic (version 0.2-3)

interval: Extract summary statistics

Description

Extract a confidence intervals, test statistics or p-values from an htest object.

Usage

interval(x, ...)

pval(x, ...)

stat(x, ...)

Arguments

x
An object of class htest.
...
Additional arguments.

Examples

Run this code
interval(t.test(rnorm(100)))
pval(t.test(rnorm(100)))
stat(t.test(rnorm(100)))
interval(var.test(rnorm(10,sd=1), rnorm(20, sd=2)))
pval(var.test(rnorm(10,sd=1), rnorm(20, sd=2)))

stat( t.test (age ~ shuffle(sex), HELP) )
# Compare to test statistic computed with permuted values of sex.
do(10) * stat( t.test (age ~ shuffle(sex), HELP) )

Run the code above in your browser using DataLab