Learn R Programming

apaText (version 0.1.7)

apa.r.compare.within.sample: Report difference in markdown APA style between between correlations within a sample

Description

Report difference in markdown APA style between between correlations within a sample

Usage

apa.r.compare.within.sample(
  formula,
  data,
  test = "pearson1898",
  alternative = "two.sided",
  show.conf.interval = NULL,
  show.N = NULL,
  show.p = NULL,
  show.statistic = NULL
)

Value

R Markdown text

Arguments

formula

Formula for comparing correlations

data

Project data frame name

test

Type of significance test. If non-overlapping variables use one of "pearson1898", "dunn1969", "steiger1980", "raghunathan1996", or "silver2004". If overlapping variables use one of pearson1898, hotelling1940, hendrickson1970, williams1959, olkin1967, dunn1969, steiger1980, meng1992, hittner2003. Default is pearson1898.

alternative

Alternative hypothesis to pass to alternative argument of cor.test. Default is "two.sided"

show.conf.interval

Show confidence interval or not (TRUE/FALSE). Default behavior is TRUE.

show.N

Show sample size or not (TRUE/FALSE). Default behavior is TRUE.

show.p

Show p-value or not (TRUE/FALSE). Default behavior is TRUE.

show.statistic

Show test statistic or not (TRUE/FALSE). Default behavior is TRUE.

Examples

Run this code

# non-overlappling variables example
apa.r.compare.within.sample(data = attitude,
  formula = ~ rating + complaints | privileges + learning)

# overlappling variables example
apa.r.compare.within.sample(data = attitude,
  formula = ~ rating + complaints | rating + learning)

Run the code above in your browser using DataLab