ggstatsplot (version 0.0.7)

bf_one_sample_ttest: Bayesian one-sample t-test.

Description

Bayesian one-sample t-test.

Usage

bf_one_sample_ttest(data, x, test.value = 0, bf.prior = 0.707,
  caption = NULL, output = "caption", k = 2)

Arguments

data

Dataframe from which variables specified are preferentially to be taken. This argument is optional.

x

A numeric variable.

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.

caption

The text for the plot caption.

output

Can either be "caption" (which will contain text for evidence in favor of null) or "results" (which will return the dataframe with results).

k

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

See Also

bf_contingency_tab, bf_oneway_anova, bf_two_sample_ttest

Examples

Run this code
# NOT RUN {
# to get caption (default)
bf_one_sample_ttest(
  data = iris,
  x = Sepal.Length,
  test.value = 5.85,
  bf.prior = 0.8,
  output = "caption", k = 2
)

# to get results dataframe
bf_one_sample_ttest(
  data = iris,
  x = Sepal.Length,
  test.value = 5.85,
  bf.prior = 0.8,
  output = "results"
)
# }

Run the code above in your browser using DataLab