Re: [R] Bartlett's Test of Sphericity

2011-10-09 Thread Fernando Henrique Ferraz Pereira da Rosa
You could also check this function I implemented awhile back: http://www.fernandohrosa.com.br/en/P/sphericity-test-for-covariance-matrices-in-r-sphericity-test/ On Fri, Jun 17, 2011 at 4:43 PM, thibault grava wrote: > Hello Dear R user, > > I want to conduct a Principal components analysis and I

Re: [R] Bartlett's Test of Sphericity

2011-06-19 Thread Tal Galili
Sorry for the confusion, thank you for the correction and explanation. Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-sta

Re: [R] Bartlett's Test of Sphericity

2011-06-18 Thread Daniel Malter
Thanks for the clarification. That makes sense. To summarize, bartlett.test() in the base distribution of R is not the sphericity test, and it relies on the higher moments of the normal distribution. The sphericity test can be computed with the formula provided or the one implemented in the psych

Re: [R] Bartlett's Test of Sphericity

2011-06-18 Thread peter dalgaard
On Jun 18, 2011, at 15:48 , Tal Galili wrote: > Hi Thibault, > Not that I think you'll use this after the above responses, but for the > record, have a look at: > ?bartlett.test That's the "other" Bartlett's test, namely the one for comparison of variances. That test is well known to rely on hi

Re: [R] Bartlett's Test of Sphericity

2011-06-18 Thread Daniel Malter
I do not understand why that would be the case as the only input involving the relationship of the data is the determinant of the correlation matrix. For what you suggest to be true, the non-normality of the data would have to introduce correlation. If what you are saying is true, we would expect

Re: [R] Bartlett's Test of Sphericity

2011-06-18 Thread Tal Galili
Hi Thibault, Not that I think you'll use this after the above responses, but for the record, have a look at: ?bartlett.test Cheers, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgali

Re: [R] Bartlett's Test of Sphericity

2011-06-18 Thread David Cross
Yes, Bartlett's is not a good way to "justify" a PCA. David Cross d.cr...@tcu.edu www.davidcross.us On Jun 18, 2011, at 1:47 AM, Jeremy Miles wrote: > cortest.bartlett() in the psych package. > > I've never seen a non-significant Bartlett's test. > > Jeremy > > > > On 17 June 2011 12:43,

Re: [R] Bartlett's Test of Sphericity

2011-06-18 Thread peter dalgaard
On Jun 18, 2011, at 10:48 , (Ted Harding) wrote: > To add to Jeremy's comment below: The Bartlett test is very > sensitive to non-normality in the data, so can readily give > "significant" results even for non-correlated data. Hmm, I wouldn't bet on that. Correlation tests are usually fairly rob

Re: [R] Bartlett's Test of Sphericity

2011-06-18 Thread Ted Harding
To add to Jeremy's comment below: The Bartlett test is very sensitive to non-normality in the data, so can readily give "significant" results even for non-correlated data. Ted. On 18-Jun-11 06:47:52, Jeremy Miles wrote: > cortest.bartlett() in the psych package. > > I've never seen a non-signifi

Re: [R] Bartlett's Test of Sphericity

2011-06-17 Thread Jeremy Miles
cortest.bartlett() in the psych package. I've never seen a non-significant Bartlett's test. Jeremy On 17 June 2011 12:43, thibault grava wrote: > Hello Dear R user, > > I want to conduct a Principal components analysis and I need to run two > tests to check whether I can do it or not. I found

Re: [R] Bartlett's Test of Sphericity

2011-06-17 Thread Daniel Malter
The formula for the chi-square value is: -( (n-1) - (2*p-5)/6 )* log(det(R)) where n is the number of observations, p is the number of variables, and R is the correlation matrix. The chi square test is then performed on (p^2-p)/2 degrees of freedom. So you can compute it by hand. Or you can use t

[R] Bartlett's Test of Sphericity

2011-06-17 Thread thibault grava
Hello Dear R user, I want to conduct a Principal components analysis and I need to run two tests to check whether I can do it or not. I found how to run the KMO test, however i cannot find an R fonction for the Bartlett's test of sphericity. Does somebody know if it exists? Thanks for your hel