sdtest: Tests of Standard Deviations and Variances

View source: R/statistics.R View source: R/zzz-r4vn-inference.R

sdtestiR Documentation

Tests of Standard Deviations and Variances

Description

Performs a one-sample chi-squared variance test or a two-sample F test.

Usage

sdtesti(
  n1,
  sd1,
  n2 = NULL,
  sd2 = NULL,
  sd0 = NULL,
  alternative = c("two.sided", "less", "greater"),
  level = 0.95,
  digits = 3,
  p_digits = 3,
  show = TRUE,
  console = FALSE
)

sdtest(
  x,
  y = NULL,
  by = NULL,
  data = NULL,
  sd0 = NULL,
  alternative = c("two.sided", "less", "greater"),
  level = 0.95,
  digits = 3,
  p_digits = 3,
  show = TRUE,
  console = FALSE
)

Arguments

n1, sd1

Sample size and standard deviation for sample 1.

n2, sd2

Optional sample size and standard deviation for sample 2.

sd0

Null standard deviation for a one-sample test.

alternative

Alternative hypothesis.

level

Confidence level.

digits, p_digits

Decimal places for estimates and p-values.

show

Logical; open the formatted result in the Viewer. Default TRUE.

console

Logical; also print the traditional text result in the Console. Default FALSE.

x, y

Numeric variables.

by

Optional two-level grouping variable.

data

Data frame. If NULL, active data is used.

Value

Invisibly returns an object of class r4vn_stat.

Examples

sdtesti(40, 3, sd0 = 2.5)
sdtesti(40, 3, 35, 4)

R4VN documentation built on Sept. 30, 2026, 5:13 p.m.