Learn R Programming

sasLM (version 1.0.1)

tmtest: Independent two means test similar to t.test with summarized input

Description

This produces essentially the same result as t.test, except using summarized input (sufficient statistics).

Usage

tmtest(m1, s1, n1, m0, s0, n0, conf.level=0.95, nullHypo=0, var.equal=FALSE)

Value

The output format is very similar to that of t.test.

Arguments

m1

mean of the first (test, active, experimental) group

s1

sample standard deviation of the first group

n1

sample size of the first group

m0

mean of the second (reference, control, placebo) group

s0

sample standard deviation of the second group

n0

sample size of the second group

conf.level

confidence level

nullHypo

value for the difference of means under the null hypothesis

var.equal

assumption on the variance equality

Author

Kyun-Seop Bae k@acr.kr

Details

The default is the Welch t-test with the Satterthwaite approximation.

See Also

mtest, TTEST, ztest

Examples

Run this code
  tmtest(5.4, 10.5, 3529, 5.1, 8.9, 5190) # NEJM 388;15 p1386
  tmtest(5.4, 10.5, 3529, 5.1, 8.9, 5190, var.equal=TRUE)

Run the code above in your browser using DataLab