Bcov: Bartlett's Test for One Sample Covariance Matrix

View source: R/Bcov.R

BcovR Documentation

Bartlett's Test for One Sample Covariance Matrix

Description

Bcov function tests whether the covariance matrix is equal to a given matrix or not.

Usage

Bcov(data, Sigma)

Arguments

data

a data frame.

Sigma

The covariance matrix in NULL hypothesis.

Details

This function computes Bartlett's test statistic for the covariance matrix of one sample.

Value

a list with 3 elements:

ChiSquare

The value of Test Statistic

df

The Chi-Square statistic's degree of freedom

p.value

p value

Author(s)

Hasan BULUT <hasan.bulut@omu.edu.tr>

References

Rencher, A. C. (2003). Methods of multivariate analysis (Vol. 492). John Wiley & Sons.

Examples


data(iris) 
S<-matrix(c(5.71,-0.8,-0.6,-0.5,-0.8,4.09,-0.74,-0.54,-0.6,
     -0.74,7.38,-0.18,-0.5,-0.54,-0.18,8.33),ncol=4,nrow=4)
result <- Bcov(data=iris[,1:4],Sigma=S)
summary(result)

MVTests documentation built on Nov. 3, 2023, 5:11 p.m.

Related to Bcov in MVTests...