Brent Caldwell
2012-Nov-27 04:08 UTC
[R] Psych package: fa.diagram, how to re-arrange layout so numbers do not over-write each other
Dear R help I have conducted a fa() analysis, and I want to use fa.diagram to assess the extent to which the 11 latent factors predict the 37 items in a psychological battery. However, the display on the screen has very large font size for the coefficients of the relationship between the 11 factors and the 37 items, so the numbers overlap and are therefore illegible. When I output this to a pdf the problem is exacerbated even further (see attachments). I tried to use cex=0.8 and cex=0.4 in the pdf argument but it made no difference - what can I do? The code I used is: fa.diagram(fa.11factors.rawdata) # Start PDF device driver to save output to fa_diagram.pdf pdf(file="I:\\ZAPi\\Tables-of-R-output\\fa_diagram.pdf", height=10, width=5) fa.diagram(fa.11factors.rawdata) #box() # Create box around plot dev.off() # Turn off device driver (to flush output to PDF) pdf(file="I:\\ZAPi\\Tables-of-R-output\\fa_diagram_cex.pdf", height=8, width=5) fa.diagram(fa.11factors.rawdata,cex=0.8) #box() # Create box around plot dev.off() # Turn off device driver (to flush output to PDF) Thank you so much for your time Yours sincerely Brent Caldwell -------------- next part -------------- A non-text attachment was scrubbed... Name: fa_diagram_cex.pdf Type: application/pdf Size: 12261 bytes Desc: fa_diagram_cex.pdf URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20121127/e2702443/attachment-0004.pdf> -------------- next part -------------- A non-text attachment was scrubbed... Name: fa_diagram.pdf Type: application/pdf Size: 12349 bytes Desc: fa_diagram.pdf URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20121127/e2702443/attachment-0005.pdf>
William R Revelle
2012-Nov-27 04:43 UTC
[R] Psych package: fa.diagram, how to re-arrange layout so numbers do not over-write each other
Brent, Try setting the cex parameter to make the numbers smaller. Also try modifying the e.size (ellipse size) parameter. Then, to make much better looking graphs, see if you can install Rgraphviz and try using the fa.rgraph function or use the graphviz=TRUE parameter. fa.diagram was a hack to get around the problem that graphviz was very hard to install and sometimes would not even be possible to use. The preferred function (if you have Rgraphviz) is fa.rgraph. Bill On Nov 26, 2012, at 10:08 PM, Brent Caldwell <brent.caldwell at otago.ac.nz> wrote:> Dear R help > I have conducted a fa() analysis, and I want to use fa.diagram to assess the extent to which the 11 latent factors predict the 37 items in a psychological battery. However, the display on the screen has very large font size for the coefficients of the relationship between the 11 factors and the 37 items, so the numbers overlap and are therefore illegible. When I output this to a pdf the problem is exacerbated even further (see attachments). I tried to use cex=0.8 and cex=0.4 in the pdf argument but it made no difference - what can I do? > The code I used is: > fa.diagram(fa.11factors.rawdata) > # Start PDF device driver to save output to fa_diagram.pdf > pdf(file="I:\\ZAPi\\Tables-of-R-output\\fa_diagram.pdf", height=10, width=5) > fa.diagram(fa.11factors.rawdata) > #box() # Create box around plot > dev.off() # Turn off device driver (to flush output to PDF) > > pdf(file="I:\\ZAPi\\Tables-of-R-output\\fa_diagram_cex.pdf", height=8, width=5) > fa.diagram(fa.11factors.rawdata,cex=0.8) > #box() # Create box around plot > dev.off() # Turn off device driver (to flush output to PDF) > Thank you so much for your time > Yours sincerely > Brent Caldwell > > <fa_diagram_cex.pdf><fa_diagram.pdf>______________________________________________ > R-help at 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.William Revelle http://personality-project.org/revelle.html Professor http://personality-project.org Department of Psychology http://www.wcas.northwestern.edu/psych/ Northwestern University http://www.northwestern.edu/ Use R for psychology http://personality-project.org/r It is 5 minutes to midnight http://www.thebulletin.org
William R Revelle
2012-Nov-27 04:53 UTC
[R] Psych package: fa.diagram, how to re-arrange layout so numbers do not over-write each other
Brent, No, cex doesn't work (as you have discovered). That is a bug. I will work on it. In the meantime, try Rgraphviz called from fa.rgaph or use the output from fa.graph which produces a dot file for processing with any graphic package (including graphviz) which handles the dot language. Bill On Nov 26, 2012, at 10:08 PM, Brent Caldwell <brent.caldwell at otago.ac.nz> wrote:> Dear R help > I have conducted a fa() analysis, and I want to use fa.diagram to assess the extent to which the 11 latent factors predict the 37 items in a psychological battery. However, the display on the screen has very large font size for the coefficients of the relationship between the 11 factors and the 37 items, so the numbers overlap and are therefore illegible. When I output this to a pdf the problem is exacerbated even further (see attachments). I tried to use cex=0.8 and cex=0.4 in the pdf argument but it made no difference - what can I do? > The code I used is: > fa.diagram(fa.11factors.rawdata) > # Start PDF device driver to save output to fa_diagram.pdf > pdf(file="I:\\ZAPi\\Tables-of-R-output\\fa_diagram.pdf", height=10, width=5) > fa.diagram(fa.11factors.rawdata) > #box() # Create box around plot > dev.off() # Turn off device driver (to flush output to PDF) > > pdf(file="I:\\ZAPi\\Tables-of-R-output\\fa_diagram_cex.pdf", height=8, width=5) > fa.diagram(fa.11factors.rawdata,cex=0.8) > #box() # Create box around plot > dev.off() # Turn off device driver (to flush output to PDF) > Thank you so much for your time > Yours sincerely > Brent Caldwell > > <fa_diagram_cex.pdf><fa_diagram.pdf>______________________________________________ > R-help at 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.William Revelle http://personality-project.org/revelle.html Professor http://personality-project.org Department of Psychology http://www.wcas.northwestern.edu/psych/ Northwestern University http://www.northwestern.edu/ Use R for psychology http://personality-project.org/r It is 5 minutes to midnight http://www.thebulletin.org
Brent Caldwell
2012-Nov-27 05:06 UTC
[R] Psych package: fa.diagram, how to re-arrange layout so numbers do not over-write each other
Dear Bill Wow! Thank you so much for your rapid reply - you are such a kind person, thank you! I'll try fa.rgraph - thanks Thanks Best wishes Brent -----Original Message----- From: William R Revelle [mailto:revelle at northwestern.edu] Sent: Tuesday, 27 November 2012 5:54 p.m. To: Brent Caldwell Cc: r-help at R-project.org Subject: Re: [R] Psych package: fa.diagram, how to re-arrange layout so numbers do not over-write each other Brent, No, cex doesn't work (as you have discovered). That is a bug. I will work on it. In the meantime, try Rgraphviz called from fa.rgaph or use the output from fa.graph which produces a dot file for processing with any graphic package (including graphviz) which handles the dot language. Bill On Nov 26, 2012, at 10:08 PM, Brent Caldwell <brent.caldwell at otago.ac.nz> wrote:> Dear R help > I have conducted a fa() analysis, and I want to use fa.diagram to assess the extent to which the 11 latent factors predict the 37 items in a psychological battery. However, the display on the screen has very large font size for the coefficients of the relationship between the 11 factors and the 37 items, so the numbers overlap and are therefore illegible. When I output this to a pdf the problem is exacerbated even further (see attachments). I tried to use cex=0.8 and cex=0.4 in the pdf argument but it made no difference - what can I do? > The code I used is: > fa.diagram(fa.11factors.rawdata) > # Start PDF device driver to save output to fa_diagram.pdf > pdf(file="I:\\ZAPi\\Tables-of-R-output\\fa_diagram.pdf", height=10, width=5) > fa.diagram(fa.11factors.rawdata) > #box() # Create box around plot > dev.off() # Turn off device driver (to flush output to PDF) > > pdf(file="I:\\ZAPi\\Tables-of-R-output\\fa_diagram_cex.pdf", height=8, width=5) > fa.diagram(fa.11factors.rawdata,cex=0.8) > #box() # Create box around plot > dev.off() # Turn off device driver (to flush output to PDF) Thank you > so much for your time Yours sincerely Brent Caldwell > > <fa_diagram_cex.pdf><fa_diagram.pdf>__________________________________ > ____________ > R-help at 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.William Revelle http://personality-project.org/revelle.html Professor http://personality-project.org Department of Psychology http://www.wcas.northwestern.edu/psych/ Northwestern University http://www.northwestern.edu/ Use R for psychology http://personality-project.org/r It is 5 minutes to midnight http://www.thebulletin.org
Apparently Analagous Threads
- In factor analysis in the psych package, how can I work out which factors the columns in $scores relate to? How do I know what each of the scores is scoring?
- color of histgram in Psych package (pairs.panels)
- diag(-1) produces weird result
- Simulating dataset using Parallel Latent CTT model?
- reliability, scale scores in the psych package