Re: [R] Factanal fits

2012-05-28 Thread Prof Brian Ripley

On 28/05/2012 02:20, Hunsicker, Lawrence wrote:

Greetings, all:

I am using factanal in R.

When I enter a matrix or a formula, the print method winds up with something 
like this:

Test of the hypothesis that 6 factors are sufficient.
The chi square statistic is 28.1 on 22 degrees of freedom.
The p-value is 0.172

But when I enter a covmat, the print method winds up with something like this:

The degrees of freedom for the model is 22 and the fit was 0.0904

The actual factanal print method is suppressed, so I can't figure out how the 
two calculations are done, or how they relate to one another.  Can any of you 
help?


No, it is not.  You can find it by getS3method, for example.


Many thanks in advance for any insight any of you can give me.


To do the tests you need the number of observations.  I expect you used 
'covmat' incorrectly, but you were too unhelpful to actually show us 
what you did.


Larry Hunsicker
Professor, Internal Medicine, U. Iowa College of Medicine




   
Notice: This UI Health Care e-mail (including attachments) is covered by the 
Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and 
may be legally privileged.  If you are not the intended recipient, you are 
hereby notified that any retention, dissemination, distribution, or copying of 
this communication is strictly prohibited.  Please reply to the sender that you 
have received the message in error, then delete it.  Thank you.
   

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


And that means YOU.  No HTML (as we asked), and include reproducible 
code for what you did and claim does not work as you want.


--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Factanal fits

2012-05-28 Thread lhunsicker
Many thanks to Michael Weylandt and Prof. Ripley for answers to yesterday's 
query.

1.  The response to 

methods(print)

is that the print.princomp method is non-visible, not suppressed, as I 
misquoted. 
The method can be located by either

getAnywhere(print.princomp)

as suggested by Michael or by 

getS3method(f = 'print', class = 'factanal')

as suggested by Prof. Ripley.  I learn something new about R every day!

2.  Prof. Ripley is correct, of course.  To print out the test whether The 
test of the hypothesis that 
X factors are sufficient. when submitting a covmat, the factanal function 
needs to know the n.obs.  The following call, packaging n.obs with the covmat, 
worked perfectly:

cor3.fa1 - factanal(factors = 6, covmat = list(cov = cor3, n.obs = 418))

Again, thanks.

Larry Hunsicker
Prof. Medicine, U. Iowa College of Medicine

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Factanal fits

2012-05-27 Thread Hunsicker, Lawrence
Greetings, all:

I am using factanal in R.

When I enter a matrix or a formula, the print method winds up with something 
like this:

Test of the hypothesis that 6 factors are sufficient.
The chi square statistic is 28.1 on 22 degrees of freedom.
The p-value is 0.172

But when I enter a covmat, the print method winds up with something like this:

The degrees of freedom for the model is 22 and the fit was 0.0904

The actual factanal print method is suppressed, so I can't figure out how the 
two calculations are done, or how they relate to one another.  Can any of you 
help?

Many thanks in advance for any insight any of you can give me.

Larry Hunsicker
Professor, Internal Medicine, U. Iowa College of Medicine




  
Notice: This UI Health Care e-mail (including attachments) is covered by the 
Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and 
may be legally privileged.  If you are not the intended recipient, you are 
hereby notified that any retention, dissemination, distribution, or copying of 
this communication is strictly prohibited.  Please reply to the sender that you 
have received the message in error, then delete it.  Thank you.
  

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Factanal fits

2012-05-27 Thread R. Michael Weylandt
I'm not sure what you mean by the method is suppressed -- if it's
not exported just use getAnywhere() to find it.

Sorry I can't give a more detailed follow up -- not at my computer right now,

Best,
Michael

On Sun, May 27, 2012 at 9:20 PM, Hunsicker, Lawrence
lawrence-hunsic...@uiowa.edu wrote:
 Greetings, all:

 I am using factanal in R.

 When I enter a matrix or a formula, the print method winds up with something 
 like this:

 Test of the hypothesis that 6 factors are sufficient.
 The chi square statistic is 28.1 on 22 degrees of freedom.
 The p-value is 0.172

 But when I enter a covmat, the print method winds up with something like this:

 The degrees of freedom for the model is 22 and the fit was 0.0904

 The actual factanal print method is suppressed, so I can't figure out how the 
 two calculations are done, or how they relate to one another.  Can any of you 
 help?

 Many thanks in advance for any insight any of you can give me.

 Larry Hunsicker
 Professor, Internal Medicine, U. Iowa College of Medicine




  
 Notice: This UI Health Care e-mail (including attachments) is covered by the 
 Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential 
 and may be legally privileged.  If you are not the intended recipient, you 
 are hereby notified that any retention, dissemination, distribution, or 
 copying of this communication is strictly prohibited.  Please reply to the 
 sender that you have received the message in error, then delete it.  Thank 
 you.
  

        [[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.