Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

onesamp

Paired Sample t-test


Description

This function performs a t-test for the mean difference for paired data, and produces a scatterplot of one column against the other column, showing whether there was any benefit to using the paired design.

Usage

onesamp(dset, x="unsprayed", y="sprayed", xlab=NULL, ylab=NULL,
        dubious=NULL, conv=NULL, dig=2)

Arguments

dset

a matrix or dataframe having two columns

x

name of column to play the role of the ‘predictor’

y

name of column to play the role of the ‘response’

xlab

horizontal axis label

ylab

vertical axis label

dubious

vector of logical (FALSE/TRUE) values, specifying points that are to be omitted

conv

scaling factor that should be applied to data

dig

round SE to this number of digits for dispplay on graph

Value

A scatterplot of y against x together with estimates of standard errors and standard errors of the difference (y-x).

Also produced is a confidence interval and p-value for the test.

Author(s)

J.H. Maindonald

Examples

onesamp(dset = pair65, x = "ambient", y = "heated", xlab =
        "Amount of stretch (ambient)", ylab =
        "Amount of stretch (heated)")

DAAG

Data Analysis and Graphics Data and Functions

v1.24
GPL-3
Authors
John H. Maindonald and W. John Braun
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.