Learn R Programming

LRTesteR (version 1.3.1)

beta_shape2_one_sample: Test the shape2 parameter of a beta distribution.

Description

Test the shape2 parameter of a beta distribution.

Usage

beta_shape2_one_sample(x, shape2, alternative = "two.sided", conf.level = 0.95)

Value

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

Arguments

x

a numeric vector of data.

shape2

a number indicating the tested value of the shape2 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.

Examples

Run this code
library(LRTesteR)

# Null is true
set.seed(1)
x <- rbeta(100, shape1 = 1, shape2 = 1)
beta_shape2_one_sample(x, 1, "two.sided")

# Null is false
set.seed(1)
x <- rbeta(100, shape1 = 1, shape2 = 3)
beta_shape2_one_sample(x, 1, "greater")

Run the code above in your browser using DataLab