ggstatsplot (version 0.0.12)

subtitle_t_onesample: Making text subtitle for one sample t-test and its nonparametric and robust equivalents.

Description

Making text subtitle for one sample t-test and its nonparametric and robust equivalents.

Usage

subtitle_t_onesample(data, x, type = "parametric", test.value = 0,
  bf.prior = 0.707, robust.estimator = "onestep", effsize.type = "g",
  effsize.noncentral = TRUE, conf.level = 0.95, conf.type = "norm",
  nboot = 100, k = 2, stat.title = NULL, messages = TRUE, ...)

Arguments

data

A dataframe (or a tibble) from which variables specified are to be taken. A matrix or tables will not be accepted.

x

A numeric variable.

type

Type of statistic expected ("parametric" or "nonparametric" or "robust" or "bayes").Corresponding abbreviations are also accepted: "p" (for parametric), "np" (nonparametric), "r" (robust), or "bf"resp.

test.value

A number specifying the value of the null hypothesis (Default: 0).

bf.prior

A number between 0.5 and 2 (default 0.707), the prior width to use in calculating Bayes factors.

robust.estimator

If test = "robust" robust estimator to be used ("onestep" (Default), "mom", or "median"). For more, see ?WRS2::onesampb.

effsize.type

Type of effect size needed for parametric tests. The argument can be "biased" ("d" for Cohen's d) or "unbiased" ("g" Hedge's g for t-test). The default is

effsize.noncentral

Logical indicating whether to use non-central t-distributions for computing the confidence interval for Cohen's d or Hedge's g (Default: TRUE).

conf.level

Scalar between 0 and 1. If unspecified, the defaults return 95% lower and upper confidence intervals (0.95).

conf.type

A vector of character strings representing the type of intervals required. The value should be any subset of the values "norm", "basic", "perc", "bca". For more, see ?boot::boot.ci.

nboot

Number of bootstrap samples for computing confidence interval for the effect size (Default: 100).

k

Number of digits after decimal point (should be an integer) (Default: k = 2).

stat.title

A character describing the test being run, which will be added as a prefix in the subtitle. The default is NULL. An example of a stat.title argument will be something like "Student's t-test: ".

messages

Decides whether messages references, notes, and warnings are to be displayed (Default: TRUE).

...

Additional arguments.

See Also

gghistostats

Examples

Run this code
# NOT RUN {
# for reproducibility
set.seed(123)

ggstatsplot::subtitle_t_onesample(
  data = iris,
  x = Sepal.Length,
  test.value = 5,
  type = "r"
)
# }

Run the code above in your browser using DataCamp Workspace