paired_observed_plot: Plots for observed matched pairs data

View source: R/s216-applets.R

paired_observed_plotR Documentation

Plots for observed matched pairs data

Description

This function will create two plots of a quantitative variable and its differences for matched pairs data.

Usage

paired_observed_plot(data, which_first = 1)

Arguments

data

Data frame with values for each group in the first two columns.

which_first

Which column is first in order of subtraction? 1 if subtracting second column from first (1 - 2); 2 if subtracting first column from second (2 - 1). Defaults to 1.

Value

Returns plot of distribution of observed values, with means & standard deviations in groups and paired observations linked by a line segment, and histogram of differences.

Examples

set.seed(117)
x <- rnorm(25)
y <- x + 1 + rnorm(25, 0, 1.8)
data <- data.frame(x, y)
paired_observed_plot(data, which_first = 1)

greenwood-stat/catstats documentation built on Dec. 14, 2024, 6:25 p.m.