Re: [R] multivariate Shapiro Wilks test

From: <apjaworski_at_mmm.com>
Date: Wed 04 May 2005 - 08:07:55 EST

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@mmm.com
Tel: (651) 733-6092
Fax: (651) 736-3122
                                                                           
             Anna Oganyan                                                  
             <aoganyan@niss.or                                             
             g>                                                         To 
             Sent by:                  r-help@stat.math.ethz.ch            
             r-help-bounces@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@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed May 04 08:16:20 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:33 EST