I am trying to conduct a multivariate normality test using the mvnormtest package on my data with two between-subjects variables, one within-subjects, and three dependent variables (binary categorical). My data looks like this (~5,600 rows with no missing data):
Cluster Group Trial Measure Measure2 Measure
1 4 1 1 1 0
1 4 1 0 0 0
1 4 1 1 1 0
1 4 1 1 1 0
1 4 1 1 1 1
1 4 1 1 1 1
1 4 1 1 1 0
1 4 1 1 1 0
Here is my setup:
data.df <- read.csv(
"data.csv",
header=TRUE, sep=","
)
attach(data.df)
names(data.df)
I attempted the following mshapiro.test()
#multivariate normality
dataMat <- data.matrix(data.df)
mshap <- mshapiro.test(dataMat)
I received the following error:
Error in solve.default(R %*% t(R), tol = 1e-18):
Lapack routine dgesv: system is exactly singular: U[7,7] = 0.
I checked on a forum from my stats class a year ago, and found that someone was able to work it by dividing the data into groups.
LowCluster <- t(dataMat[c(1:1877),1:6])
MedCluster <- t(dataMat[c(1878:3166),1:6])
HigCluster <- t(dataMat[c(3167:5364),1:6])
mshaplow <- mshapiro.test(LowCluster)
mshapmed <- mshapiro.test(MedCluster)
mshaphigh <- mshapiro.test(HigCluster)
I got the same error.
Error in solve.default(R %*% t(R), tol = 1e-18) :
Lapack routine dgesv: system is exactly singular: U[7,7] = 0
How can I resolve this?