https://github.com/cran/inferr
Raw File
Tip revision: 59444f93bc0b45cd4ab2cf3493acf201d9fdc5b9 authored by Aravind Hebbali on 28 May 2021, 16:30:02 UTC
version 0.3.1
Tip revision: 59444f9
infer_levene_test.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ifr-levene-test.R
\name{infer_levene_test}
\alias{infer_levene_test}
\alias{infer_levene_test.default}
\title{Levene's test for equality of variances}
\usage{
infer_levene_test(data, ...)

\method{infer_levene_test}{default}(data, ..., group_var = NULL, trim_mean = 0.1)
}
\arguments{
\item{data}{a \code{data.frame} or \code{tibble}}

\item{...}{numeric; columns in \code{data}}

\item{group_var}{factor; column in \code{data}}

\item{trim_mean}{trimmed mean}
}
\value{
\code{infer_levene_test} returns an object of class \code{"infer_levene_test"}.
An object of class \code{"infer_levene_test"} is a list containing the
following components:

\item{bf}{Brown and Forsythe f statistic}
\item{p_bf}{p-value for Brown and Forsythe f statistic}
\item{lev}{Levene's f statistic}
\item{p_lev}{p-value for Levene's f statistic}
\item{bft}{Brown and Forsythe f statistic using trimmed mean}
\item{p_bft}{p-value for Brown and Forsythe f statistic using trimmed mean}
\item{avgs}{mean for each level of the grouping variable}
\item{sds}{standard deviations for each level of the grouping variable}
\item{avg}{combined mean}
\item{sd}{combined standard deviation}
\item{n}{number of observations}
\item{n_df}{numerator degrees of freedom}
\item{d_df}{denominator degrees of freedom}
\item{levs}{levels of the grouping variable}
\item{lens}{number of observations for each level of the grouping variable}
\item{type}{alternative hypothesis}
}
\description{
\code{infer_levene_test} reports Levene's robust test statistic
for the equality of variances and the
two statistics proposed by Brown and Forsythe that replace the mean in
Levene's formula with alternative location estimators. The first alternative
replaces the mean with the median. The second alternative replaces
the mean with the 10% trimmed mean.
}
\section{Deprecated Function}{

\code{levene_test()} has been deprecated. Instead use \code{infer_levene_test()}.
}

\examples{
# using grouping variable
infer_levene_test(hsb, read, group_var = race)

# using  variables
infer_levene_test(hsb, read, write, socst)

}
\references{
{Bland, M. 2000. An Introduction to Medical Statistics. 3rd ed. Oxford: Oxford University Press.}

{Brown, M. B., and A. B. Forsythe. 1974. Robust tests for the equality of variances. Journal of the American Statistical Association 69: 364–367.}

{Carroll, R. J., and H. Schneider. 1985. A note on Levene’s tests for equality of variances. Statistics and Probability Letters 3: 191–194.}
}
back to top