infer_ts_var_test
performs tests on the equality of standard
deviations (variances).
infer_ts_var_test( data, ..., group_var = NULL, alternative = c("less", "greater", "all") )
data | a |
---|---|
... | numeric; column(s) in |
group_var | factor; column in |
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. |
infer_ts_var_test
returns an object of class "infer_ts_var_test"
.
An object of class "infer_ts_var_test"
is a list containing the
following components:
f statistic
lower one-sided p-value
upper one-sided p-value
two-sided p-value
variances for each level of the grouping variable
means for each level of the grouping variable
standard deviations for each level of the grouping variable
standard errors for each level of the grouping variable
combined mean
combined standard deviation
estimated combined standard error
numerator degrees of freedom
denominator degrees of freedom
number of observations for each level of grouping variable
number of observations
levels of the grouping variable
alternative hypothesis
var_test()
has been deprecated. Instead use infer_ts_var_test()
.
Sheskin, D. J. 2007. Handbook of Parametric and Nonparametric Statistical Procedures, 4th edition. : Chapman & Hall/CRC.
# using grouping variable infer_ts_var_test(hsb, read, group_var = female, alternative = 'less') #> Variance Ratio Test #> -------------------------------------------------- #> Group Obs Mean Std. Err. Std. Dev. #> -------------------------------------------------- #> 0 91 52.82 1.1 10.51 #> 1 109 51.73 0.96 10.06 #> -------------------------------------------------- #> combined 200 52.23 0.72 10.25 #> -------------------------------------------------- #> #> Lower Tail Test #> --------------- #> ratio = sd(0) / (1) #> Ho: ratio = 1 #> Ha: ratio < 1 #> #> Variance Ratio Test #> ------------------------------------ #> F Num DF Den DF p #> ------------------------------------ #> 1.0913 90 108 0.6694 #> ------------------------------------ # using two variables infer_ts_var_test(hsb, read, write, alternative = 'less') #> Variance Ratio Test #> -------------------------------------------------- #> Group Obs Mean Std. Err. Std. Dev. #> -------------------------------------------------- #> read 200 52.23 0.72 10.25 #> write 200 52.77 0.67 9.48 #> -------------------------------------------------- #> combined 400 52.5 0.49 9.86 #> -------------------------------------------------- #> #> Lower Tail Test #> --------------- #> ratio = sd(read) / (write) #> Ho: ratio = 1 #> Ha: ratio < 1 #> #> Variance Ratio Test #> ------------------------------------ #> F Num DF Den DF p #> ------------------------------------ #> 1.1701 199 199 0.8656 #> ------------------------------------