cauchy_scale_one_sample: Test the scale parameter of a cauchy distribution.

cauchy_scale_one_sampleR Documentation

Test the scale parameter of a cauchy distribution.

Description

Test the scale parameter of a cauchy distribution.

Usage

cauchy_scale_one_sample(x, scale, alternative = "two.sided", conf.level = 0.95)

Arguments

x

a numeric vector of at least 50 data values.

scale

a number indicating the tested value of the scale parameter.

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less".

conf.level

confidence level of the likelihood interval.

Value

An S3 class containing the test statistic, p value, likelihood based confidence interval, and alternative hypothesis.

Source

Examples

library(LRTesteR)

# Null is true
set.seed(1)
x <- rcauchy(n = 100, location = 1, scale = 2)
cauchy_scale_one_sample(x, 2, "two.sided")

# Null is false
set.seed(1)
x <- rcauchy(n = 100, location = 3, scale = 2)
cauchy_scale_one_sample(x, 1, "greater")

gmcmacran/MLTesteR documentation built on Sept. 12, 2024, 3:30 p.m.