log_normal_variance_one_sample: Test the variance of a log normal distribution.

log_normal_variance_one_sampleR Documentation

Test the variance of a log normal distribution.

Description

Test the variance of a log normal distribution.

Usage

log_normal_variance_one_sample(
  x,
  sigma.squared,
  alternative = "two.sided",
  conf.level = 0.95
)

Arguments

x

a numeric vector of data.

sigma.squared

a number indicating the tested value of sigma squared.

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 <- rlnorm(100, 0, 1)
log_normal_variance_one_sample(x, 1, "two.sided")

# Null is false
set.seed(1)
x <- rlnorm(100, 0, 2)
log_normal_variance_one_sample(x, 1, "greater")

LRTesteR documentation built on June 8, 2025, 12:06 p.m.