# [R] multivariate Shapiro Wilks test

apjaworski@mmm.com apjaworski at mmm.com
Wed May 4 00:07:55 CEST 2005

```

Anna,

It looks like the mshapiro.test wants its data in the row format, that is,
for a k-variate sample of size n you need the data in a k-by-n matrix.

Try

a <- t(mvrnorm(1000, c(1,2,3,4,5), diag(5)))
mshapiro.test(a)

and it should work fine.

Cheers,

Andy

__________________________________
Andy Jaworski
518-1-01
Process Laboratory
3M Corporate Research Laboratory
-----
E-mail: apjaworski at mmm.com
Tel:  (651) 733-6092
Fax:  (651) 736-3122

Anna Oganyan
<aoganyan at niss.or
g>                                                         To
Sent by:                  r-help at stat.math.ethz.ch
r-help-bounces at st                                          cc
at.math.ethz.ch
Subject
[R] multivariate Shapiro Wilks test
05/03/2005 04:29
AM

Hello,
I have a question about multivariate Shapiro-Wilks test.
I tried to analyze if the data I have are multivariate normal, or how
far they are from being
multivariate normal. However, any time I did
>mshapiro.test(mydata)
I get the message:
Error in solve.default(R %*% t(R), tol = 1e-18) :
system is computationally singular: reciprocal condition number
= 5.38814e-021

I tried also to generate some multivariate normal data and to see how
the test would be working on it. So I did:
a <- mvrnorm(1000, c(1,2,3,4,5), diag(5))
mshapiro.test(a)

But any time I get:
Error in solve.default(R %*% t(R), tol = 1e-18) :
system is computationally singular: reciprocal condition number
= small number

Could somebody help me what is wrong with this example?
Thank you very much in advance!
Anna

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help