one.sample.test: One Sample Test

Description Usage Arguments Value See Also Examples

View source: R/one.sample.test.R

Description

Performs a one sample test.

Usage

1

Arguments

variables

A variable or dataframe of variables

data

The data frame in which variables is evaluated

test

A function whose first argument is the sample to be tested, and whose result is an object of class htest.

...

further arguments for func

Value

A multi.test object, representing a table of the results of test applied to each of the variables.

See Also

t.test shapiro.test

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(anorexia)

#are subjects' weights at baseline and endpoint significantly different from normal
one.sample.test(variables=d(Prewt,Postwt),
	data=anorexia,
	test=shapiro.test)

#does CBT work at increasing mean wt
anorexia.sub<-subset(anorexia,Treat=="CBT")
one.sample.test(variables=Postwt-Prewt,
	data=anorexia.sub,
	test=t.test)

Deducer documentation built on May 2, 2019, 8:35 a.m.