ifr_os_var_test: One Sample Variance Comparison Test

View source: R/ifr-os-var-test.R

ifr_os_var_testR Documentation

One Sample Variance Comparison Test

Description

ifr_os_var_test performs tests on the equality of standard deviations (variances).It tests that the standard deviation of a sample is equal to a hypothesized value.

Usage

ifr_os_var_test(
  data,
  x,
  sd,
  confint = 0.95,
  alternative = c("both", "less", "greater", "all"),
  ...
)

Arguments

data

a data.frame or tibble

x

numeric; column in data

sd

hypothesised standard deviation

confint

confidence level

alternative

a character string specifying the alternative hypothesis, must be one of "both" (default), "greater", "less" or "all". You can specify just the initial letter

...

additional arguments passed to or from other methods

Value

ifr_os_var_test returns an object of class "ifr_os_var_test". An object of class "ifr_os_var_test" is a list containing the following components:

n

number of observations

sd

hypothesised standard deviation of x

sigma

observed standard deviation

se

estimated standard error

chi

chi-square statistic

df

degrees of freedom

p_lower

lower one-sided p-value

p_upper

upper one-sided p-value

p_two

two-sided p-value

xbar

mean of x

c_lwr

lower confidence limit of standard deviation

c_upr

upper confidence limit of standard deviation

var_name

name of x

conf

confidence level

type

alternative hypothesis

Deprecated Function

infer_os_var_test() has been deprecated. Instead use ifr_os_var_test().

References

Sheskin, D. J. 2007. Handbook of Parametric and Nonparametric Statistical Procedures, 4th edition. : Chapman & Hall/CRC.

See Also

var.test

Examples

# lower tail
ifr_os_var_test(mtcars, mpg, 5, alternative = 'less')

# upper tail
ifr_os_var_test(mtcars, mpg, 5, alternative = 'greater')

# both tails
ifr_os_var_test(mtcars, mpg, 5, alternative = 'both')

# all tails
ifr_os_var_test(mtcars, mpg, 5, alternative = 'all')


inferr documentation built on April 4, 2025, 2:08 a.m.