<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>R-statistics blog &#187; statistics</title>
	<atom:link href="http://www.r-statistics.com/tag/statistics/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.r-statistics.com</link>
	<description>Writing about statistics with R, and open source stuff (software, data, community)</description>
	<lastBuildDate>Thu, 29 Jul 2010 01:51:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Want to join the closed BETA of a new Statistical Analysis Q&amp;A site &#8211; NOW is the time!</title>
		<link>http://www.r-statistics.com/2010/07/want-to-join-the-closed-beta-of-a-new-statistical-analysis-qa-site-now-is-the-time/</link>
		<comments>http://www.r-statistics.com/2010/07/want-to-join-the-closed-beta-of-a-new-statistical-analysis-qa-site-now-is-the-time/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 07:06:56 +0000</pubDate>
		<dc:creator>Tal Galili</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[R community]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[communites]]></category>
		<category><![CDATA[machine learning]]></category>
		<category><![CDATA[online]]></category>
		<category><![CDATA[Q&A]]></category>
		<category><![CDATA[statistical analysis]]></category>

		<guid isPermaLink="false">http://www.r-statistics.com/?p=474</guid>
		<description><![CDATA[The bottom line of this post is for you to go to: Stack Exchange Q&#038;A site proposal: Statistical Analysis And commit yourself to using the website for asking and answering questions. (And also consider giving the contender, MetaOptimize a visit) * * * * Statistical analysis Q&#038;A website is about to go into BETA A month ago I invited readers of this blog to commit to using a new Q&#038;A website for Data-Analysis (based on StackOverFlow engine), once it will [...]]]></description>
			<content:encoded><![CDATA[<p><strong>The bottom line of this post is for you to go to:<br />
<a href="http://area51.stackexchange.com/proposals/33/statistical-analysis?referrer=3OUOcMUJcOo1">Stack Exchange Q&#038;A site proposal: Statistical Analysis </a><br />
And commit yourself to using the website for asking and answering questions.</strong></p>
<p>(And also consider giving the contender, <a href="http://metaoptimize.com/qa">MetaOptimize</a> a visit)</p>
<p>* * * * </p>
<h3>Statistical analysis Q&#038;A website is about to go into BETA</h3>
<p>A month ago I <a href="http://www.r-statistics.com/2010/06/a-new-qa-website-for-data-analysis-based-on-stackoverflow-engine-is-waiting-for-you/">invited readers of this blog to commit to using a new Q&#038;A website for Data-Analysis</a> (based on StackOverFlow engine), once it will open (the site was originally proposed by <a href="http://robjhyndman.com/researchtips/">Rob Hyndman</a>).<br />
And now, a month later, I am happy to write that <strong>over 500 people</strong> have shown interest in the website, and choose to commit themselves.  This means we we have reached 100% completion of the website proposal process, and in the next few days we will move to the next step.</p>
<p>The next step is that the website will go into closed BETA for about a week.  If you want to be part of this &#8211; now is <a href="http://area51.stackexchange.com/proposals/33/statistical-analysis?referrer=3OUOcMUJcOo1">the time to join</a> (<--- call for action people).<br />
From being part in some other closed BETA of similar projects, I can attest that the enthusiasm of the people trying to answer questions in the BETA is very impressive, so I strongly recommend the experience.</p>
<p>If you won't make it by the time you see this post, then no worries - about a week or so after the website will go online, it will be open to the wide public.</p>
<p>(p.s: thanks Romunov for pointing out to me that the BETA is about to open)</p>
<h3>p.s: MetaOptimize</h3>
<p>I would like to finish this post with mentioning <a href="http://metaoptimize.com/qa/">MetaOptimize</a>.   This is a Q&#038;A website which is of a more &#8220;machine learning&#8221; then a &#8220;statistical&#8221; community.  It also started out some short while ago, and already it has <a href="http://metaoptimize.com/qa/users/">around 700 users</a> who have submitted ~160 questions with ~520 answers given.  From my experience on the site so far, I have enjoyed the high quality of the questions and answers.<br />
When I first came by the website, I feared that supporting this website will split the R community of users between this website and the <a href="http://area51.stackexchange.com/proposals/33/statistical-analysis?referrer=3OUOcMUJcOo1">area 51 StackExchange website</a>.<br />
But after a lengthy discussion (<a href="http://www.r-statistics.com/2010/07/statistical-analysis-qa-website-did-stackoverflow-just-lose-it-to-metaoptimize-and-is-it-good-or-bad/">published recently as a post</a>) with MetaOptimize founder, Joseph Turian, I came to have a more optimistic view of the competition of the two websites.  Where at first I was afraid, I am now <strong>hopeful</strong> that each of the two website will manage to draw a tiny bit of different communities of people (that would otherwise wouldn&#8217;t be present in the other website) &#8211; thus offering all of us a wider variety of knowledge to tap into.</p>
<p>See you there&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.r-statistics.com/2010/07/want-to-join-the-closed-beta-of-a-new-statistical-analysis-qa-site-now-is-the-time/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>&#8220;The next big thing&#8221;, R, and Statistics in the cloud</title>
		<link>http://www.r-statistics.com/2010/04/r-the-next-big-thing-and-statistics-in-the-cloud/</link>
		<comments>http://www.r-statistics.com/2010/04/r-the-next-big-thing-and-statistics-in-the-cloud/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 15:28:15 +0000</pubDate>
		<dc:creator>Tal Galili</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[R and the web]]></category>
		<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[cloud statistics]]></category>
		<category><![CDATA[future]]></category>
		<category><![CDATA[linked data web]]></category>
		<category><![CDATA[open data]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[web of data]]></category>

		<guid isPermaLink="false">http://www.r-statistics.com/?p=271</guid>
		<description><![CDATA[A friend just e-mailed me about a blog post by Dr. AnnMaria De Mars titled &#8220;The Next Big Thing&#8221;. In it Dr. De Mars wrote (I allowed myself to emphasize some parts of the text): Contrary to what some people seem to think, R is definitely not the next big thing, either. I am always surprised when people ask me why I think that, because to my mind it is obvious. [...] for me personally and for most users, both individual and [...]]]></description>
			<content:encoded><![CDATA[<p>A friend just e-mailed me about a<a href="http://www.thejuliagroup.com/blog/?p=433"> blog post by Dr. AnnMaria De Mars titled &#8220;The Next Big Thing&#8221;</a>.</p>
<p>In it Dr. De Mars wrote (I allowed myself to emphasize some parts of the text):</p>
<blockquote><p>Contrary to what some people seem to think, R is definitely <strong><span style="text-decoration: underline;">not<span style="font-weight: normal;"> the next big thing</span></span></strong>, either. I am always surprised when people ask me why I think that, because to my mind it is obvious. [...]<br />
for me personally and for most users, both individual and organizational, the much greater cost of software is the time it takes to install it, maintain it, learn it and document it. On that, <strong><span style="text-decoration: underline;"><span style="font-weight: normal;">R is an epic</span> fail</span></strong>. It does NOT fit with the way the vast majority of people in the world use computers. The vast majority of people are NOT programmers. They are used to looking at things and clicking on things.</p></blockquote>
<p>Here are my two cents on the subject:<br />
<span id="more-271"></span></p>
<p>First, I agree with Dr. De Mars that R (out of the box) is not very (non programmer) user friendly &#8211; there is (almost) no point and click capabilities.  And while there are several projects offering a GUI layer interface to R (a good list of them can be found <a href="http://en.wikipedia.org/wiki/R_(programming_language)#Graphical_user_interfaces">here</a>), still non of them is in the level of refinement of what softwares like SPSS, JMP or SAS offers to users today.</p>
<p>But is traditional &#8220;point and click&#8221; the next &#8220;big thing&#8221;?  My suspicion is that the answer is &#8211; no.<br />
Neither does Dr. De Mars thinks so, since her predictions for the next big thing are &#8220;Data visualization&#8221; and &#8220;Analyzing enormous quantities of unstructured data&#8221;.  Both of which R is offering quite powerful solutions to (assuming that you will go through the learning curve).</p>
<p>Dr. De Mars question is a fascinating one &#8211; what IS going to be the next big thing?</p>
<p>I think that the next BIG thing is (becoming to be) &#8220;<strong>Statistics in the Cloud</strong>&#8220;.  This intuition came from (among other things) my<a href="http://www.r-statistics.com/2010/03/the-future-of-open-source-survey-an-r-users-thoughts-and-conclusions/"> review of the “Future of Open Source” Survey</a> (see &#8220;conclusion 3&#8243;).</p>
<p>In the near future, I believe, we will see more statisticians and data analysts tapping into the opportunities that cloud computing offers them.  Here are some examples of what I came a cross (or covered) lately in the topic of cloud computing and R:</p>
<ol>
<li><a href="http://www.r-statistics.com/2010/03/google-spreadsheets-google-forms-r-easily-collecting-and-importing-data-for-analysis/">Easy online collecting of data (via google forms)</a></li>
<li>High-performance computing - Running a statistical package software on the cloud for accessing a powerful computer or running stuff in parallel.  The former can be done through services like Amazon cloud, Elastic R, and lately <a href="http://www.r-statistics.com/2010/04/r-node-a-web-front-end-to-r-with-protovis/">R-Node combines the running of R and Protovis </a>on a server.  The later I don&#8217;t have experience in, but understand there are various solutions in R (a known company in the field is, of course, <a href="http://www.revolution-computing.com/">REvolution computing</a>)</li>
<li>Online statistical analysis/visualization of data - Having a web interface to a statistical analysis.  One wonderful example of that is <a href="http://www.r-statistics.com/2010/04/jeroen-oomss-ggplot2-web-interface-a-new-version-released-v0-2/">Jeroen Oom&#8217;s (beautiful) web interface to ggplot2</a>.  Such projects offer &#8220;point and click&#8221; capabilities through the internet (/cloud)</li>
<li>Online interactive visualization of data.  I came a cross three people offering to develop solutions for doing this with R in this year&#8217;s Google summer of code, I hope something will come out of it</li>
</ol>
<p>All of these are well connected to the emerging trend of “web of data”/“linked data web” that some are talking about. For example, here is a good Ted talk by Tim Berners-Lee (the inventor of the World Wide Web). Talking about building a web for open, linked data that could do for numbers what the Web did for words, pictures, video: unlock our data and reframe the way we use it together.<br />
<object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/OM6XIICm_qo&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/OM6XIICm_qo&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object><br />
The same plea is given by Hans rosling in his <a href="http://www.youtube.com/watch?v=hVimVzgtD6w">famous Ted talk</a> showing <a href="http://GapMinder.org">GapMinder</a>.<br />
Although at he same time, some R users are saying &#8211; &#8220;<a href="http://nsaunders.wordpress.com/2010/04/15/id-be-more-than-happy-with-the-unlinked-data-web/">You don&#8217;t have to bother linking the data. I&#8217;ll do with just the data, really, just release it&#8230;</a>&#8221;</p>
<p>In conclusion, I don&#8217;t know what capabilities other projects/products offer for doing statistics in the cloud.  But it is clear to me that the R community is (not surprisingly) bringing very diverse and innovative solutions to the world.</p>
<p>Is R the next big thing?  I don&#8217;t think so.  But I do think that some of the next big thing<strong><span style="text-decoration: underline;">s</span></strong> will be built with R.<br />
*  *  *<br />
I would love to know your thought about Dr. De Mars post, and also about what the &#8220;next big thing&#8221; is going to be (and what role will R have in it).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.r-statistics.com/2010/04/r-the-next-big-thing-and-statistics-in-the-cloud/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Repeated measures ANOVA with R (functions and tutorials)</title>
		<link>http://www.r-statistics.com/2010/04/repeated-measures-anova-with-r-tutorials/</link>
		<comments>http://www.r-statistics.com/2010/04/repeated-measures-anova-with-r-tutorials/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 08:10:51 +0000</pubDate>
		<dc:creator>Tal Galili</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[R links]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[ANOVA]]></category>
		<category><![CDATA[aov]]></category>
		<category><![CDATA[car]]></category>
		<category><![CDATA[ez]]></category>
		<category><![CDATA[ezANOVA]]></category>
		<category><![CDATA[friedman]]></category>
		<category><![CDATA[friedman test]]></category>
		<category><![CDATA[friedman's test]]></category>
		<category><![CDATA[repeated measures]]></category>
		<category><![CDATA[repeated measures anova]]></category>
		<category><![CDATA[Repeated measuresANOVA]]></category>
		<category><![CDATA[Repeatedmeasures]]></category>
		<category><![CDATA[SS]]></category>
		<category><![CDATA[SS type I]]></category>
		<category><![CDATA[SS type I error]]></category>
		<category><![CDATA[SS type III]]></category>
		<category><![CDATA[SS type III error]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Unbalanced design]]></category>

		<guid isPermaLink="false">http://www.r-statistics.com/?p=236</guid>
		<description><![CDATA[Repeated measures ANOVA is a common task for the data analyst. There are (at least) two ways of performing &#8220;repeated measures ANOVA&#8221; using R but none is really trivial, and each way has it&#8217;s own complication/pitfalls (explanation/solution to which I was usually able to find through searching in the R-help mailing list). So for future reference, I am starting this page to document links I find to tutorials, explanations (and troubleshooting) of &#8220;repeated measure ANOVA&#8221; done with R Functions and [...]]]></description>
			<content:encoded><![CDATA[<p>Repeated measures ANOVA is a common task for the data analyst.</p>
<p>There are (at least) two ways of performing &#8220;repeated measures ANOVA&#8221; using R but none is really trivial, and each way has it&#8217;s own complication/pitfalls (explanation/solution to which I was usually able to find through searching in the R-help mailing list).</p>
<p>So for future reference, I am starting this page to document links I find to tutorials, explanations (and troubleshooting) of &#8220;repeated measure ANOVA&#8221; done with R</p>
<h3>Functions and packages</h3>
<p>(I suggest using the tutorials supplied bellow for how to use these functions)</p>
<ul>
<li>aov {stats} &#8211; offers SS type I repeated measures anova,  by a call to lm for each stratum.  A short example is given in the ?aov help file</li>
<li>Anova {<a href="http://cran.r-project.org/web/packages/car/index.html">car</a>} &#8211; Calculates type-II or type-III analysis-of-variance tables for model objects produced by lm, and for various other object.  The ?Anova help file offers an example for how to use this for repeated measures</li>
<li>ezANOVA {<a href="http://cran.r-project.org/web/packages/ez/index.html">ez</a>} &#8211; This function provides easy analysis of data from factorial experiments, including purely within-Ss designs (a.k.a. &#8220;repeated measures&#8221;), purely between-Ss designs, and mixed within-and-between-Ss designs, yielding ANOVA results and assumption checks.  It is a wrapper of the Anova {car} function, and is easier to use.  The ez package also offers the functions ezPlot and ezStats to give plot and statistics of the ANOVA analysis.  The ?ezANOVA help file gives a good demonstration for the functions use (My thanks goes to Matthew Finkbe for letting me know about this cool package)</li>
<li>friedman.test {stats} &#8211; Performs a Friedman rank sum test with unreplicated blocked data.  That is, a non-parametric one-way repeated measures anova.  I also wrote a wrapper function to perform and plot <a href="http://www.r-statistics.com/2010/02/post-hoc-analysis-for-friedmans-test-r-code/">a post-hoc analysis on the friedman test results</a> </li>
<li>Non parametric multi way repeated measures anova &#8211; I believe such a function could be developed based on the Proportional Odds Model, maybe using the {repolr} or the {ordinal} packages.  But I still didn&#8217;t come across any function that implements these models (if you do &#8211; please let me know in the comments).</li>
</ul>
<h3>Good Tutorials</h3>
<ul>
<li>A basic tutorial about ANOVA with R (only the last bit holds some example of repeated measures) on <a href="http://www.personality-project.org/R/r.anova.html">personality-project</a></li>
<li><a href="http://www.personality-project.org/R/r.anova.html"></a>A thorough tutorial on <a href="http://gribblelab.org/2009/03/09/repeated-measures-anova-using-r/">motor control lab</a></li>
<li><a href="http://gribblelab.org/2009/03/09/repeated-measures-anova-using-r/"></a>A thorough tutorial on <a href="http://www.ats.ucla.edu/stat/R/seminars/Repeated_Measures/repeated_measures.htm">UCLA seminar page</a></li>
<li><a href="http://www.psych.upenn.edu/~baron/rpsych/rpsych.html#SECTION00079000000000000000">Another good tutorial</a> by<br />
Jonathan Baron and Yuelin Li (on <a href="http://www.psych.upenn.edu/~baron/rpsych/rpsych.html">&#8220;Notes on the use of R for psychology experiments and questionnaires&#8221;</a></li>
</ul>
<h3>Troubelshooting</h3>
<p><strong>Unbalanced design</strong><br />
Unbalanced design doesn&#8217;t work when doing  repeated measures ANOVA with aov, it just doesn&#8217;t.  This situation occurs if there are missing values in the data or that the data is not from a fully balanced design.  The way this will show up in your output is that you will see the between subject section showing withing subject variables.</p>
<p>A solution for this might be to use the<a href="http://finzi.psych.upenn.edu/R/library/car/html/Anova.html"> Anova</a> function from library car with parameter type=&#8221;III&#8221;.  But before doing that, first make sure you understand the difference between SS type I, II and III. <a href="http://prometheus.scp.rochester.edu/zlab/sites/default/files/InteractionsAndTypesOfSS.pdf">Here is a good tutorial</a> for helping you out with that.<br />
By the way, these links are also useful in case you want to do a simple two way ANOVA for unbalanced design</p>
<p>I will &#8220;later&#8221; add R-help mailing list discussions that I found helpful on the subject.</p>
<p>If you come across good resources, please let me know about them in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.r-statistics.com/2010/04/repeated-measures-anova-with-r-tutorials/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Correlation scatter-plot matrix for ordered-categorical data</title>
		<link>http://www.r-statistics.com/2010/04/correlation-scatter-plot-matrix-for-ordered-categorical-data/</link>
		<comments>http://www.r-statistics.com/2010/04/correlation-scatter-plot-matrix-for-ordered-categorical-data/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 21:37:26 +0000</pubDate>
		<dc:creator>Tal Galili</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[visualization]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[correlation]]></category>
		<category><![CDATA[correlation matrix]]></category>
		<category><![CDATA[correlation scatter plot]]></category>
		<category><![CDATA[non-parametric]]></category>
		<category><![CDATA[non-parametric test]]></category>
		<category><![CDATA[nonparametric]]></category>
		<category><![CDATA[nonparametric test]]></category>
		<category><![CDATA[R code]]></category>
		<category><![CDATA[scatter plot]]></category>
		<category><![CDATA[scatter plot matrix]]></category>
		<category><![CDATA[spearman correlation]]></category>
		<category><![CDATA[spearman test]]></category>
		<category><![CDATA[stackoverflow]]></category>
		<category><![CDATA[survey]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.r-statistics.com/?p=256</guid>
		<description><![CDATA[When analyzing a questionnaire, one often wants to view the correlation between two or more Likert questionnaire item&#8217;s (for example: two ordered categorical vectors ranging from 1 to 5). When dealing with several such Likert variable&#8217;s, a clear presentation of all the pairwise relation&#8217;s between our variable can be achieved by inspecting the (Spearman) correlation matrix (easily achieved in R by using the &#8220;cor.test&#8221; command on a matrix of variables). Yet, a challenge appears once we wish to plot this [...]]]></description>
			<content:encoded><![CDATA[<p>When analyzing a questionnaire, one often wants to view the correlation between two or more <a href="http://en.wikipedia.org/wiki/Likert_scale">Likert questionnaire</a> item&#8217;s (for example: two ordered categorical vectors ranging from 1 to 5).</p>
<p>When dealing with several such Likert variable&#8217;s, a clear presentation of all the pairwise relation&#8217;s between our variable can be achieved by inspecting the (Spearman) correlation matrix (easily achieved in R by using the &#8220;cor.test&#8221; command on a matrix of variables).<br />
Yet, a challenge appears once we wish to plot this correlation matrix.  The challenge stems from the fact that the classic presentation for a correlation matrix is a <strong>scatter plot matrix</strong> &#8211; but scatter plots don&#8217;t (usually) work well for ordered categorical vectors since the dots on the scatter plot often overlap each other.</p>
<p>There are four solution for the point-overlap problem that I know of:</p>
<ol>
<li>Jitter the data a bit to give a sense of the &#8220;density&#8221; of the points</li>
<li>Use a color spectrum to represent when a point actually represent &#8220;many points&#8221;</li>
<li>Use different points sizes to represent when there are &#8220;many points&#8221; in the location of that point</li>
<li>Add a LOWESS (or LOESS) line to the scatter plot &#8211; to show the trend of the data</li>
</ol>
<p>In this post I will offer the code for the  a solution that uses solution 3-4 (and possibly 2, please read this post comments). Here is the output (click to see a larger image):</p>
<p><a href="http://www.r-statistics.com/wp-content/uploads/2010/04/scatter-plot-correlation-matrix.png"><img class="alignnone size-full wp-image-257" title="scatter plot correlation matrix" src="http://www.r-statistics.com/wp-content/uploads/2010/04/scatter-plot-correlation-matrix.png" alt="" width="550"/></a></p>
<p>And here is the code to produce this plot:</p>
<p><span id="more-256"></span></p>
<h3>R code for producing a Correlation scatter-plot matrix &#8211; for ordered-categorical data</h3>
<p><strong>Note</strong> that this code will work fine for continues data points (although I might suggest to enlarge the &#8220;point.size.rescale&#8221; parameter to something bigger then 1.5 in the &#8220;panel.smooth.ordered.categorical&#8221; function)</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
</pre></td><td class="code"><pre class="rsplus" style="font-family:monospace;"><span style="color: #228B22;"># -----------------</span>
<span style="color: #228B22;"># Functions</span>
<span style="color: #228B22;"># -----------------</span>
&nbsp;
panel.<span style="">cor</span>.<span style="">ordered</span>.<span style="">categorical</span> <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">function</span><span style="color: #080;">&#40;</span>x, y, digits<span style="color: #080;">=</span><span style="color: #ff0000;">2</span>, prefix<span style="color: #080;">=</span><span style="color: #ff0000;">&quot;&quot;</span>, cex.<span style="">cor</span><span style="color: #080;">&#41;</span> 
<span style="color: #080;">&#123;</span>
&nbsp;
    usr <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">par</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">&quot;usr&quot;</span><span style="color: #080;">&#41;</span><span style="color: #080;">;</span> <span style="color: #0000FF; font-weight: bold;">on.<span style="">exit</span></span><span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">par</span><span style="color: #080;">&#40;</span>usr<span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span> 
    <span style="color: #0000FF; font-weight: bold;">par</span><span style="color: #080;">&#40;</span>usr <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">0</span>, <span style="color: #ff0000;">1</span>, <span style="color: #ff0000;">0</span>, <span style="color: #ff0000;">1</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span> 
&nbsp;
    r <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">abs</span><span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">cor</span><span style="color: #080;">&#40;</span>x, y, method <span style="color: #080;">=</span> <span style="color: #ff0000;">&quot;spearman&quot;</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span> <span style="color: #228B22;"># notive we use spearman, non parametric correlation here</span>
    r.<span style="">no</span>.<span style="">abs</span> <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">cor</span><span style="color: #080;">&#40;</span>x, y, method <span style="color: #080;">=</span> <span style="color: #ff0000;">&quot;spearman&quot;</span><span style="color: #080;">&#41;</span>
&nbsp;
&nbsp;
    txt <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">format</span><span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span>r.<span style="">no</span>.<span style="">abs</span> , <span style="color: #ff0000;">0.123456789</span><span style="color: #080;">&#41;</span>, digits<span style="color: #080;">=</span>digits<span style="color: #080;">&#41;</span><span style="color: #080;">&#91;</span><span style="color: #ff0000;">1</span><span style="color: #080;">&#93;</span> 
    txt <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">paste</span><span style="color: #080;">&#40;</span>prefix, txt, sep<span style="color: #080;">=</span><span style="color: #ff0000;">&quot;&quot;</span><span style="color: #080;">&#41;</span> 
    <span style="color: #0000FF; font-weight: bold;">if</span><span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">missing</span><span style="color: #080;">&#40;</span>cex.<span style="">cor</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span> cex <span style="color: #080;">&lt;-</span> <span style="color: #ff0000;">0.8</span><span style="color: #080;">/</span><span style="color: #0000FF; font-weight: bold;">strwidth</span><span style="color: #080;">&#40;</span>txt<span style="color: #080;">&#41;</span> 
&nbsp;
    test <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">cor.<span style="">test</span></span><span style="color: #080;">&#40;</span>x,y, method <span style="color: #080;">=</span> <span style="color: #ff0000;">&quot;spearman&quot;</span><span style="color: #080;">&#41;</span> 
    <span style="color: #228B22;"># borrowed from printCoefmat</span>
    Signif <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">symnum</span><span style="color: #080;">&#40;</span>test$p.<span style="">value</span>, corr <span style="color: #080;">=</span> FALSE, na <span style="color: #080;">=</span> FALSE, 
                  cutpoints <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">0</span>, <span style="color: #ff0000;">0.001</span>, <span style="color: #ff0000;">0.01</span>, <span style="color: #ff0000;">0.05</span>, <span style="color: #ff0000;">0.1</span>, <span style="color: #ff0000;">1</span><span style="color: #080;">&#41;</span>,
                  <span style="color: #0000FF; font-weight: bold;">symbols</span> <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">&quot;***&quot;</span>, <span style="color: #ff0000;">&quot;**&quot;</span>, <span style="color: #ff0000;">&quot;*&quot;</span>, <span style="color: #ff0000;">&quot;.&quot;</span>, <span style="color: #ff0000;">&quot; &quot;</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span> 
&nbsp;
    <span style="color: #0000FF; font-weight: bold;">text</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">0.5</span>, <span style="color: #ff0000;">0.5</span>, txt, cex <span style="color: #080;">=</span> cex <span style="color: #080;">*</span> r<span style="color: #080;">&#41;</span> 
    <span style="color: #0000FF; font-weight: bold;">text</span><span style="color: #080;">&#40;</span>.8, .8, Signif, cex<span style="color: #080;">=</span>cex, <span style="color: #0000FF; font-weight: bold;">col</span><span style="color: #080;">=</span><span style="color: #ff0000;">2</span><span style="color: #080;">&#41;</span> 
<span style="color: #080;">&#125;</span>
&nbsp;
&nbsp;
&nbsp;
&nbsp;
panel.<span style="">smooth</span>.<span style="">ordered</span>.<span style="">categorical</span> <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">function</span> <span style="color: #080;">&#40;</span>x, y, <span style="color: #0000FF; font-weight: bold;">col</span> <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">par</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">&quot;col&quot;</span><span style="color: #080;">&#41;</span>, bg <span style="color: #080;">=</span> NA, pch <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">par</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">&quot;pch&quot;</span><span style="color: #080;">&#41;</span>, 
												cex <span style="color: #080;">=</span> <span style="color: #ff0000;">1</span>, col.<span style="">smooth</span> <span style="color: #080;">=</span> <span style="color: #ff0000;">&quot;red&quot;</span>, span <span style="color: #080;">=</span> <span style="color: #ff0000;">2</span><span style="color: #080;">/</span><span style="color: #ff0000;">3</span>, iter <span style="color: #080;">=</span> <span style="color: #ff0000;">3</span>, 
												point.<span style="">size</span>.<span style="">rescale</span> <span style="color: #080;">=</span> <span style="color: #ff0000;">1.5</span>, ...<span style="color: #080;">&#41;</span> 
<span style="color: #080;">&#123;</span>
	<span style="color: #228B22;">#require(colorspace)</span>
    <span style="color: #0000FF; font-weight: bold;">require</span><span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">reshape</span><span style="color: #080;">&#41;</span>
    z <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">merge</span><span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">data.<span style="">frame</span></span><span style="color: #080;">&#40;</span>x,y<span style="color: #080;">&#41;</span>, melt<span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">table</span><span style="color: #080;">&#40;</span>x ,y<span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>,<span style="color: #0000FF; font-weight: bold;">sort</span> <span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">F</span><span style="color: #080;">&#41;</span>$value
    <span style="color: #228B22;">#the.col &lt;- heat_hcl(length(x))[z]</span>
    z <span style="color: #080;">&lt;-</span> point.<span style="">size</span>.<span style="">rescale</span><span style="color: #080;">*</span>z<span style="color: #080;">/</span> <span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">length</span><span style="color: #080;">&#40;</span>x<span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span> <span style="color: #228B22;"># notice how we rescale the dots accourding to the maximum z could have gotten</span>
&nbsp;
    <span style="color: #0000FF; font-weight: bold;">symbols</span><span style="color: #080;">&#40;</span> x, y,  circles <span style="color: #080;">=</span> z,<span style="color: #228B22;">#rep(0.1, length(x)), #sample(1:2, length(x), replace = T) ,</span>
			inches<span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">F</span>, bg<span style="color: #080;">=</span> <span style="color: #ff0000;">&quot;grey&quot;</span>,<span style="color: #228B22;">#the.col ,</span>
			fg <span style="color: #080;">=</span> bg, add <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">T</span><span style="color: #080;">&#41;</span>
&nbsp;
    <span style="color: #228B22;"># points(x, y, pch = pch, col = col, bg = bg, cex = cex)</span>
    ok <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">is.<span style="">finite</span></span><span style="color: #080;">&#40;</span>x<span style="color: #080;">&#41;</span> <span style="color: #080;">&amp;</span> <span style="color: #0000FF; font-weight: bold;">is.<span style="">finite</span></span><span style="color: #080;">&#40;</span>y<span style="color: #080;">&#41;</span>
    <span style="color: #0000FF; font-weight: bold;">if</span> <span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">any</span><span style="color: #080;">&#40;</span>ok<span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span> 
        <span style="color: #0000FF; font-weight: bold;">lines</span><span style="color: #080;">&#40;</span>stats<span style="color: #080;">::</span><span style="color: #0000FF; font-weight: bold;">lowess</span><span style="color: #080;">&#40;</span>x<span style="color: #080;">&#91;</span>ok<span style="color: #080;">&#93;</span>, y<span style="color: #080;">&#91;</span>ok<span style="color: #080;">&#93;</span>, f <span style="color: #080;">=</span> span, iter <span style="color: #080;">=</span> iter<span style="color: #080;">&#41;</span>, 
            <span style="color: #0000FF; font-weight: bold;">col</span> <span style="color: #080;">=</span> col.<span style="">smooth</span>, ...<span style="color: #080;">&#41;</span>
<span style="color: #080;">&#125;</span>
&nbsp;
&nbsp;
panel.<span style="">hist</span> <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">function</span><span style="color: #080;">&#40;</span>x, ...<span style="color: #080;">&#41;</span>
<span style="color: #080;">&#123;</span>
    usr <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">par</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">&quot;usr&quot;</span><span style="color: #080;">&#41;</span><span style="color: #080;">;</span> <span style="color: #0000FF; font-weight: bold;">on.<span style="">exit</span></span><span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">par</span><span style="color: #080;">&#40;</span>usr<span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>
    <span style="color: #0000FF; font-weight: bold;">par</span><span style="color: #080;">&#40;</span>usr <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span>usr<span style="color: #080;">&#91;</span><span style="color: #ff0000;">1</span><span style="color: #080;">:</span><span style="color: #ff0000;">2</span><span style="color: #080;">&#93;</span>, <span style="color: #ff0000;">0</span>, <span style="color: #ff0000;">1.5</span><span style="color: #080;">&#41;</span> <span style="color: #080;">&#41;</span>
    h <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">hist</span><span style="color: #080;">&#40;</span>x, <span style="color: #0000FF; font-weight: bold;">plot</span> <span style="color: #080;">=</span> FALSE, br <span style="color: #080;">=</span> <span style="color: #ff0000;">20</span><span style="color: #080;">&#41;</span>
    breaks <span style="color: #080;">&lt;-</span> h$breaks<span style="color: #080;">;</span> nB <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">length</span><span style="color: #080;">&#40;</span>breaks<span style="color: #080;">&#41;</span>
    y <span style="color: #080;">&lt;-</span> h$counts<span style="color: #080;">;</span> y <span style="color: #080;">&lt;-</span> y<span style="color: #080;">/</span><span style="color: #0000FF; font-weight: bold;">max</span><span style="color: #080;">&#40;</span>y<span style="color: #080;">&#41;</span>
    <span style="color: #0000FF; font-weight: bold;">rect</span><span style="color: #080;">&#40;</span>breaks<span style="color: #080;">&#91;</span><span style="color: #080;">-</span>nB<span style="color: #080;">&#93;</span>, <span style="color: #ff0000;">0</span>, breaks<span style="color: #080;">&#91;</span><span style="color: #080;">-</span><span style="color: #ff0000;">1</span><span style="color: #080;">&#93;</span>, y, <span style="color: #0000FF; font-weight: bold;">col</span><span style="color: #080;">=</span><span style="color: #ff0000;">&quot;orange&quot;</span>, ...<span style="color: #080;">&#41;</span>
<span style="color: #080;">&#125;</span>
&nbsp;
&nbsp;
pairs.<span style="">ordered</span>.<span style="">categorical</span> <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">function</span><span style="color: #080;">&#40;</span>xx,...<span style="color: #080;">&#41;</span>
		<span style="color: #080;">&#123;</span>
			<span style="color: #0000FF; font-weight: bold;">pairs</span><span style="color: #080;">&#40;</span>xx , 
					diag.<span style="">panel</span> <span style="color: #080;">=</span> panel.<span style="">hist</span> ,
					lower.<span style="">panel</span><span style="color: #080;">=</span>panel.<span style="">smooth</span>.<span style="">ordered</span>.<span style="">categorical</span>,
					upper.<span style="">panel</span><span style="color: #080;">=</span>panel.<span style="">cor</span>.<span style="">ordered</span>.<span style="">categorical</span>,
					cex.<span style="">labels</span> <span style="color: #080;">=</span> <span style="color: #ff0000;">1.5</span>, ...<span style="color: #080;">&#41;</span> 
		<span style="color: #080;">&#125;</span>
&nbsp;
&nbsp;
&nbsp;
&nbsp;
<span style="color: #228B22;"># -----------------</span>
<span style="color: #228B22;"># Example</span>
<span style="color: #228B22;"># -----------------</span>
&nbsp;
<span style="color: #0000FF; font-weight: bold;">set.<span style="">seed</span></span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">666</span><span style="color: #080;">&#41;</span>
a1 <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">sample</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">1</span><span style="color: #080;">:</span><span style="color: #ff0000;">5</span>, <span style="color: #ff0000;">100</span>, <span style="color: #0000FF; font-weight: bold;">replace</span> <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">T</span><span style="color: #080;">&#41;</span>
a2 <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">sample</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">1</span><span style="color: #080;">:</span><span style="color: #ff0000;">5</span>, <span style="color: #ff0000;">100</span>, <span style="color: #0000FF; font-weight: bold;">replace</span> <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">T</span><span style="color: #080;">&#41;</span>
a3 <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">round</span><span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">jitter</span><span style="color: #080;">&#40;</span>a2, <span style="color: #ff0000;">7</span><span style="color: #080;">&#41;</span> <span style="color: #080;">&#41;</span>
	a3<span style="color: #080;">&#91;</span>a3 <span style="color: #080;">&lt;</span> <span style="color: #ff0000;">1</span> <span style="color: #080;">|</span> a3 <span style="color: #080;">&gt;</span> <span style="color: #ff0000;">5</span><span style="color: #080;">&#93;</span> <span style="color: #080;">&lt;-</span> <span style="color: #ff0000;">3</span>
a4 <span style="color: #080;">&lt;-</span> <span style="color: #ff0000;">6</span><span style="color: #080;">-</span><span style="color: #0000FF; font-weight: bold;">round</span><span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">jitter</span><span style="color: #080;">&#40;</span>a1, <span style="color: #ff0000;">7</span><span style="color: #080;">&#41;</span> <span style="color: #080;">&#41;</span>
	a4<span style="color: #080;">&#91;</span>a4 <span style="color: #080;">&lt;</span> <span style="color: #ff0000;">1</span> <span style="color: #080;">|</span> a4 <span style="color: #080;">&gt;</span> <span style="color: #ff0000;">5</span><span style="color: #080;">&#93;</span> <span style="color: #080;">&lt;-</span> <span style="color: #ff0000;">3</span>
&nbsp;
aa <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">data.<span style="">frame</span></span><span style="color: #080;">&#40;</span>a1,a2,a3, a4<span style="color: #080;">&#41;</span>
&nbsp;
<span style="color: #0000FF; font-weight: bold;">require</span><span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">reshape</span><span style="color: #080;">&#41;</span>
&nbsp;
<span style="color: #228B22;"># plotting :)		</span>
pairs.<span style="">ordered</span>.<span style="">categorical</span><span style="color: #080;">&#40;</span>aa<span style="color: #080;">&#41;</span></pre></td></tr></table></div>

<h3> Credits: </h3>
<ul>
<li>The original R code for the correlation matrix plot was taken from <a href="http://addictedtor.free.fr/graphiques/graphcode.php?graph=137">R Graph Gallery</a> (The differences are: 1) The use of spearman correlation;  2) The adding of hist panel and;  3) The changing of points sizes</li>
<li>The idea to use symbols for changing the point sizes was <a href="http://stackoverflow.com/questions/2593643/correlation-scatter-matrix-plot-with-different-point-size-in-r">offered</a> by <a href="http://www.linkedin.com/pub/doug-y-barbo/2/356/416">Doug Y&#8217;barbo</a>.<br />
And also to<a href="http://dirk.eddelbuettel.com/"> Dirk Eddelbuettel </a>for offering to use cex (although I ended up not using that)</li>
</ul>
<p>If you got ideas on how to improve this code (or reproducing it with ggplot2 or lattice), please do so in the comments (or on your own blog, but be sure to let me know <img src='http://www.r-statistics.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />   )</p>
]]></content:encoded>
			<wfw:commentRss>http://www.r-statistics.com/2010/04/correlation-scatter-plot-matrix-for-ordered-categorical-data/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Nutritional supplements efficacy score &#8211; Graphing plots of current studies results (using R)</title>
		<link>http://www.r-statistics.com/2010/02/nutritional-supplements-efficacy-score-graphing-plots-of-current-studies-results-using-r/</link>
		<comments>http://www.r-statistics.com/2010/02/nutritional-supplements-efficacy-score-graphing-plots-of-current-studies-results-using-r/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 21:17:07 +0000</pubDate>
		<dc:creator>Tal Galili</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[visualization]]></category>
		<category><![CDATA[allergy research supplements]]></category>
		<category><![CDATA[amino acids supplements]]></category>
		<category><![CDATA[balloon]]></category>
		<category><![CDATA[balloon plot]]></category>
		<category><![CDATA[balloon plot R]]></category>
		<category><![CDATA[barplot]]></category>
		<category><![CDATA[benefits supplements]]></category>
		<category><![CDATA[capsules supplements]]></category>
		<category><![CDATA[dietary research]]></category>
		<category><![CDATA[effects supplements]]></category>
		<category><![CDATA[fibromyalgia research]]></category>
		<category><![CDATA[glucosamine research]]></category>
		<category><![CDATA[glucosamine supplements]]></category>
		<category><![CDATA[google excel]]></category>
		<category><![CDATA[google spread sheet]]></category>
		<category><![CDATA[google spreadsheet]]></category>
		<category><![CDATA[green tea research]]></category>
		<category><![CDATA[hair loss research]]></category>
		<category><![CDATA[herbal research]]></category>
		<category><![CDATA[herbs research]]></category>
		<category><![CDATA[herbs supplements]]></category>
		<category><![CDATA[immune system supplements]]></category>
		<category><![CDATA[liquid research]]></category>
		<category><![CDATA[liquid supplements]]></category>
		<category><![CDATA[magnesium research]]></category>
		<category><![CDATA[mineral research]]></category>
		<category><![CDATA[minerals research]]></category>
		<category><![CDATA[natural health supplements]]></category>
		<category><![CDATA[natural research]]></category>
		<category><![CDATA[nutritional research]]></category>
		<category><![CDATA[plot]]></category>
		<category><![CDATA[pregnancy supplements]]></category>
		<category><![CDATA[R code]]></category>
		<category><![CDATA[side effects supplements]]></category>
		<category><![CDATA[sports nutrition supplements]]></category>
		<category><![CDATA[supplement research]]></category>
		<category><![CDATA[supplements body building]]></category>
		<category><![CDATA[supplements bodybuilding]]></category>
		<category><![CDATA[supplements dietary]]></category>
		<category><![CDATA[supplements foods]]></category>
		<category><![CDATA[supplements herbal]]></category>
		<category><![CDATA[supplements mineral]]></category>
		<category><![CDATA[supplements minerals]]></category>
		<category><![CDATA[supplements nutritional]]></category>
		<category><![CDATA[supplements products]]></category>
		<category><![CDATA[supplements protein]]></category>
		<category><![CDATA[supplements research]]></category>
		<category><![CDATA[take supplements]]></category>
		<category><![CDATA[taking supplements]]></category>
		<category><![CDATA[thyroid research]]></category>
		<category><![CDATA[vitamin b supplements]]></category>
		<category><![CDATA[vitamin c research]]></category>
		<category><![CDATA[vitamin c supplements]]></category>
		<category><![CDATA[vitamin d research]]></category>
		<category><![CDATA[vitamins discount]]></category>
		<category><![CDATA[vitamins minerals supplements]]></category>
		<category><![CDATA[vitamins research]]></category>
		<category><![CDATA[weight loss research]]></category>

		<guid isPermaLink="false">http://www.r-statistics.com/?p=171</guid>
		<description><![CDATA[In this post I showcase a nice bar-plot and a balloon-plot listing recommended Nutritional supplements , according to how much evidence exists for thier benefits, scroll down to see it(and click here for the data behind it) * * * * The gorgeous blog &#8220;Information Is Beautiful&#8221; recently publish an eye candy post showing a “balloon race” image (see a static version of the image here) illustrating how much evidence exists for the benefits of various Nutritional supplements (such as: [...]]]></description>
			<content:encoded><![CDATA[<p>In this post I showcase a nice <strong>bar-plot and a balloon-plot listing recommended Nutritional supplements</strong> , according to how much evidence exists for thier benefits, scroll down to see it(and <a href="http://spreadsheets.google.com/ccc?key=0Aqe2P9sYhZ2ndFRKaU1FaWVvOEJiV2NwZ0JHck12X1E&amp;hl=en_GB">click here</a> for the data behind it)<br />
*  *  *  *<br />
The gorgeous blog <a href="http://www.informationisbeautiful.net/">&#8220;Information Is Beautiful&#8221;</a> recently publish an <a href="http://www.informationisbeautiful.net/play/snake-oil-supplements/">eye candy post</a> showing a “balloon race” image (see a static version of the image <a href="http://www.informationisbeautiful.net/visualizations/snake-oil-supplements/">here</a>) illustrating how much evidence exists for the benefits of various Nutritional supplements (such as: green tea, vitamins, herbs, pills and so on) . The higher the bubble in the Y axis <del datetime="2010-03-06T11:34:54+00:00">score (e.g: the bubble size)</del> for the supplement the greater the evidence there is for its effectiveness (But only for the conditions listed along side the supplement).</p>
<p>There are two reasons this should be of interest to us:</p>
<ol>
<li>This shows a fun plot, that R currently doesn&#8217;t know how to do (at least I wasn&#8217;t able to find an implementation for it). So if anyone thinks of an easy way for making one &#8211; please let me know.</li>
<li>The data for the graph is openly (and freely) provided to all of us on <a href="http://spreadsheets.google.com/ccc?key=0Aqe2P9sYhZ2ndFRKaU1FaWVvOEJiV2NwZ0JHck12X1E&amp;hl=en_GB">this Google Doc</a>.</li>
</ol>
<p>The advantage of having the data on a google doc means that we can see when the data will be updated. But more then that, it means we can easily extract the data into R and have our way with it  (Thanks to <a href="http://blog.revolution-computing.com/2009/09/how-to-use-a-google-spreadsheet-as-data-in-r.html">David Smith&#8217;s post </a>on the subject)</p>
<p>For example, I was wondering what are ALL of the top recommended Nutritional supplements, an answer that is not trivial to get from the plot that was in the <a href="http://www.informationisbeautiful.net/play/snake-oil-supplements/">original post</a>.</p>
<p>In this post I will supply two plots that present the data: A barplot (that in retrospect didn&#8217;t prove to be good enough) and a balloon-plot for a table (that seems to me to be much better).</p>
<p><strong>Barplot</strong><br />
(You can <strong>click the image to enlarge</strong> it)<br />
<a href="http://www.r-statistics.com/wp-content/uploads/2010/02/Nutritional-supplements-efficacy.png"><img class="alignnone size-full wp-image-172" title="Nutritional supplements efficacy" src="http://www.r-statistics.com/wp-content/uploads/2010/02/Nutritional-supplements-efficacy.png" alt="" width="550" /></a></p>
<p>The R code to produce the barplot of Nutritional supplements efficacy score (by evidence for its effectiveness on the listed condition).</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td class="code"><pre class="rsplus" style="font-family:monospace;">&nbsp;
<span style="color: #228B22;"># loading the data</span>
supplements.<span style="">data</span>.0 <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">read.<span style="">csv</span></span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">&quot;http://spreadsheets.google.com/pub?key=0Aqe2P9sYhZ2ndFRKaU1FaWVvOEJiV2NwZ0JHck12X1E&amp;output=csv&quot;</span><span style="color: #080;">&#41;</span>
supplements.<span style="">data</span> <span style="color: #080;">&lt;-</span> supplements.<span style="">data</span>.0<span style="color: #080;">&#91;</span>supplements.<span style="">data</span>.0<span style="color: #080;">&#91;</span>,<span style="color: #ff0000;">2</span><span style="color: #080;">&#93;</span> <span style="color: #080;">&gt;</span><span style="color: #ff0000;">2</span>,<span style="color: #080;">&#93;</span> <span style="color: #228B22;"># let's only look at &quot;good&quot; supplements</span>
supplements.<span style="">data</span> <span style="color: #080;">&lt;-</span> supplements.<span style="">data</span><span style="color: #080;">&#91;</span><span style="color: #080;">!</span><span style="color: #0000FF; font-weight: bold;">is.<span style="">na</span></span><span style="color: #080;">&#40;</span>supplements.<span style="">data</span><span style="color: #080;">&#91;</span>,<span style="color: #ff0000;">2</span><span style="color: #080;">&#93;</span><span style="color: #080;">&#41;</span>,<span style="color: #080;">&#93;</span> <span style="color: #228B22;"># and we don't want any missing data</span>
&nbsp;
supplement.<span style="">score</span> <span style="color: #080;">&lt;-</span> supplements.<span style="">data</span><span style="color: #080;">&#91;</span>, <span style="color: #ff0000;">2</span><span style="color: #080;">&#93;</span>
ss <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">order</span><span style="color: #080;">&#40;</span>supplement.<span style="">score</span>, decreasing  <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">F</span><span style="color: #080;">&#41;</span>	<span style="color: #228B22;"># sort our data</span>
supplement.<span style="">score</span> <span style="color: #080;">&lt;-</span> supplement.<span style="">score</span><span style="color: #080;">&#91;</span>ss<span style="color: #080;">&#93;</span>
supplement.<span style="">name</span> <span style="color: #080;">&lt;-</span> supplements.<span style="">data</span><span style="color: #080;">&#91;</span>ss, <span style="color: #ff0000;">1</span><span style="color: #080;">&#93;</span>
supplement.<span style="">benefits</span> <span style="color: #080;">&lt;-</span> supplements.<span style="">data</span><span style="color: #080;">&#91;</span>ss, <span style="color: #ff0000;">4</span><span style="color: #080;">&#93;</span>
supplement.<span style="">score</span>.<span style="">col</span> <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">factor</span><span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">as.<span style="">character</span></span><span style="color: #080;">&#40;</span>supplement.<span style="">score</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>
	<span style="color: #0000FF; font-weight: bold;">levels</span><span style="color: #080;">&#40;</span>supplement.<span style="">score</span>.<span style="">col</span><span style="color: #080;">&#41;</span> <span style="color: #080;">&lt;-</span>  <span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">&quot;red&quot;</span>, <span style="color: #ff0000;">&quot;orange&quot;</span>, <span style="color: #ff0000;">&quot;blue&quot;</span>, <span style="color: #ff0000;">&quot;dark green&quot;</span><span style="color: #080;">&#41;</span>
	supplement.<span style="">score</span>.<span style="">col</span> <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">as.<span style="">character</span></span><span style="color: #080;">&#40;</span>supplement.<span style="">score</span>.<span style="">col</span><span style="color: #080;">&#41;</span>
&nbsp;
<span style="color: #228B22;"># mar: c(bottom, left, top, right) The default is c(5, 4, 4, 2) + 0.1.</span>
<span style="color: #0000FF; font-weight: bold;">par</span><span style="color: #080;">&#40;</span>mar <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">5</span>,<span style="color: #ff0000;">9</span>,<span style="color: #ff0000;">4</span>,<span style="color: #ff0000;">13</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>	<span style="color: #228B22;"># taking care of the plot margins</span>
bar.<span style="">y</span> <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">barplot</span><span style="color: #080;">&#40;</span>supplement.<span style="">score</span>, names.<span style="">arg</span><span style="color: #080;">=</span> supplement.<span style="">name</span>, las <span style="color: #080;">=</span> <span style="color: #ff0000;">1</span>, horiz <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">T</span>, <span style="color: #0000FF; font-weight: bold;">col</span> <span style="color: #080;">=</span> supplement.<span style="">score</span>.<span style="">col</span>, xlim <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">0</span>,<span style="color: #ff0000;">6.2</span><span style="color: #080;">&#41;</span>,
				main <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">&quot;Nutritional supplements efficacy score&quot;</span>,<span style="color: #ff0000;">&quot;(by evidence for its effectiveness on the listed condition)&quot;</span>, <span style="color: #ff0000;">&quot;(2010)&quot;</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>
<span style="color: #0000FF; font-weight: bold;">axis</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">4</span>, <span style="color: #0000FF; font-weight: bold;">labels</span> <span style="color: #080;">=</span> supplement.<span style="">benefits</span>, at <span style="color: #080;">=</span> bar.<span style="">y</span>, las <span style="color: #080;">=</span> <span style="color: #ff0000;">1</span><span style="color: #080;">&#41;</span> <span style="color: #228B22;"># Add right axis</span>
<span style="color: #0000FF; font-weight: bold;">abline</span><span style="color: #080;">&#40;</span>h <span style="color: #080;">=</span> bar.<span style="">y</span>, <span style="color: #0000FF; font-weight: bold;">col</span> <span style="color: #080;">=</span> supplement.<span style="">score</span>.<span style="">col</span> , lty <span style="color: #080;">=</span> <span style="color: #ff0000;">2</span><span style="color: #080;">&#41;</span> <span style="color: #228B22;"># add some lines so to easily follow each bar</span></pre></td></tr></table></div>

<p>Also, the nice things is that if the guys at Information Is Beautiful will update there data, we could easily run the code and see the updated list of recommended supplements.</p>
<p><strong>Balloon plot</strong><br />
So after some web surfing I came around an implementation of a balloon plot in R (Thanks to <a href="http://addictedtor.free.fr/graphiques/graphcode.php?graph=60">R graph gallery</a>)<br />
There where two problems with using the command out of the box. The first one was that the colors where non informative (easily fixed), the second one was that the X labels where overlapping one another. Since there is no &#8220;las&#8221; parameter in the function, I just opened the function up, found where this was plotted and changed it manually (a bit messy, but that&#8217;s what you have to do sometimes&#8230;)</p>
<p>Here are the result (you can click the image for a larger image):</p>
<p><a href="http://www.r-statistics.com/wp-content/uploads/2010/02/balloonplot.png"><img src="http://www.r-statistics.com/wp-content/uploads/2010/02/balloonplot.png" alt="" title="balloonplot" width="550" class="alignnone size-full wp-image-199" /></a></p>
<p>And here is The R code to produce the Balloon plot of Nutritional supplements efficacy score (by evidence for its effectiveness on the listed condition).<br />
 (it&#8217;s just the copy of the function with a tiny bit of editing in line 146, and then using it)</p>
<p><span id="more-171"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
</pre></td><td class="code"><pre class="rsplus" style="font-family:monospace;">&nbsp;
<span style="color: #0000FF; font-weight: bold;">require</span><span style="color: #080;">&#40;</span>colorspace<span style="color: #080;">&#41;</span>
<span style="color: #0000FF; font-weight: bold;">require</span><span style="color: #080;">&#40;</span>gplots<span style="color: #080;">&#41;</span>
&nbsp;
<span style="color: #228B22;"># I was able to find the function by using</span>
<span style="color: #228B22;"># methods(balloonplot)[1]</span>
<span style="color: #228B22;"># This command: getAnywhere(&quot;balloonplot.default&quot;) # Wouldn't work...</span>
balloonplot2 <span style="color: #080;">&lt;-</span> gplots<span style="color: #080;">:::</span><span style="">balloonplot</span>.<span style="">default</span> <span style="color: #228B22;"># This one works :)</span>
&nbsp;
<span style="color: #228B22;"># now run:</span>
<span style="color: #0000FF; font-weight: bold;">fix</span><span style="color: #080;">&#40;</span>balloonplot2<span style="color: #080;">&#41;</span>
<span style="color: #228B22;"># search for </span>
<span style="color: #228B22;"># y &lt;- ny + 0.75 + (nlabels.x - i + 0.5) * colmar</span>
<span style="color: #228B22;"># And add beneath it the following line:</span>
<span style="color: #228B22;"># y &lt;- rep(y, dim(xlabs)[1]) - c(0,.5,1)</span>
&nbsp;
supplement.<span style="">benefits</span> <span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">tolower</span><span style="color: #080;">&#40;</span>supplement.<span style="">benefits</span> <span style="color: #080;">&#41;</span>
supplement.<span style="">name</span>		<span style="color: #080;">&lt;-</span> <span style="color: #0000FF; font-weight: bold;">tolower</span><span style="color: #080;">&#40;</span>supplement.<span style="">name</span><span style="color: #080;">&#41;</span>
&nbsp;
balloonplot2<span style="color: #080;">&#40;</span> supplement.<span style="">name</span>,supplement.<span style="">benefits</span>, supplement.<span style="">score</span>, xlab <span style="color: #080;">=</span><span style="color: #ff0000;">&quot;supplement&quot;</span>, ylab<span style="color: #080;">=</span><span style="color: #ff0000;">&quot;Benefit&quot;</span>,
			show.<span style="">margins</span><span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">F</span>, dotsize <span style="color: #080;">=</span> <span style="color: #ff0000;">15</span>,fun<span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">function</span><span style="color: #080;">&#40;</span>x<span style="color: #080;">&#41;</span><span style="color: #0000FF; font-weight: bold;">max</span><span style="color: #080;">&#40;</span>x,na.<span style="">rm</span><span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">T</span><span style="color: #080;">&#41;</span>,			
			rowmar <span style="color: #080;">=</span> <span style="color: #ff0000;">7</span>,
			colmar <span style="color: #080;">=</span> <span style="color: #ff0000;">7</span>,
			dotcolor <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">rev</span><span style="color: #080;">&#40;</span>heat_hcl<span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">max</span><span style="color: #080;">&#40;</span> supplement.<span style="">score</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#91;</span> supplement.<span style="">score</span><span style="color: #080;">-</span><span style="color: #ff0000;">1</span><span style="color: #080;">&#93;</span>,
			main <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">&quot;Balloon plot of&quot;</span>, <span style="color: #ff0000;">&quot;Nutritional supplements efficacy score&quot;</span>,<span style="color: #ff0000;">&quot;(by evidence for its effectiveness on the listed condition)&quot;</span>, <span style="color: #ff0000;">&quot;(2010)&quot;</span><span style="color: #080;">&#41;</span>,
			<span style="color: #0000FF; font-weight: bold;">sub</span> <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">&quot;Published on www.r-statistics.com&quot;</span><span style="color: #080;">&#41;</span>				
			<span style="color: #080;">&#41;</span></pre></td></tr></table></div>

<p>Got any good ideas of how else to plot the data? let me know in the comments <img src='http://www.r-statistics.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.r-statistics.com/2010/02/nutritional-supplements-efficacy-score-graphing-plots-of-current-studies-results-using-r/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Statistics plugins for WordPress</title>
		<link>http://www.r-statistics.com/2010/02/statistics-plugins-for-wordpress/</link>
		<comments>http://www.r-statistics.com/2010/02/statistics-plugins-for-wordpress/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 19:17:38 +0000</pubDate>
		<dc:creator>Tal Galili</dc:creator>
				<category><![CDATA[WordPress and Statistics]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[avinash kushnik]]></category>
		<category><![CDATA[crazy egg]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[nuconomy]]></category>
		<category><![CDATA[piwik]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[web analytics]]></category>
		<category><![CDATA[webanalytics]]></category>
		<category><![CDATA[woopra]]></category>

		<guid isPermaLink="false">http://www.r-statistics.com/?p=65</guid>
		<description><![CDATA[Today I came across a post named &#8220;24 Noble WordPress Plugins To Determine The Performance of your Blog&#8221; through Weblog Tools Collection (one of my favorite places to stay updates on wordpress). The post provided a good solid list of statistics plugins for wordpress. Some of them are too old to count (pun intended), others are much more recent and relevant. As a statistics (and WordPress) lover myself, I was inspired to extend the list of wordpress statistics plugins for [...]]]></description>
			<content:encoded><![CDATA[<p>Today I came across a post named &#8220;<a href="http://www.appsheriff.com/software/tools-software/24-noble-wordpress-plugins-to-determine-the-performance-of-your-blog/">24 Noble WordPress Plugins To Determine The Performance of your Blog</a>&#8221; through <a href="http://weblogtoolscollection.com/archives/2010/01/31/24-plugins-for-stats-junkies/">Weblog Tools Collection</a> (one of my favorite places to stay updates on wordpress). The post provided a good solid list of statistics plugins for wordpress. Some of them are <a href="http://gdymov.com/inbound-links-backlinks-wordpress-plugin/">too old to count</a> (pun intended), others are much more recent and relevant.</p>
<p>As a statistics (and WordPress) lover myself, I was inspired to extend the list of <strong><span style="text-decoration: underline;">wordpress statistics plugins</span></strong> for the hope of benefiting the community:<br />
<a href="http://wordpress.org/extend/plugins/blog-metrics/"><strong>Blog Metrics</strong></a><br />
This plugin is based on ideas in an <a onclick="javascript:pageTracker._trackPageview('/outbound/article/www.kaushik.net');" href="http://www.kaushik.net/avinash/2007/11/blog-metrics-six-recommendations-for-measuring-your-success.html">excellent post</a> by <a href="http://www.kaushik.net">Avinash Kaushik</a> (Whom I consider a Web analytics <strong>guru</strong> and a brilliant blogger!).</p>
<blockquote><p>it calculates:</p>
<ul>
<li> Raw Author Contribution:
<ul>
<li>average number of posts per month</li>
<li>average number of words per post</li>
</ul>
</li>
<li>Conversation Rate:
<ul>
<li>average number of comments per post<em>without your own comments</em></li>
<li><em><span style="font-style: normal;">average number of words used in comments to posts</span></em></li>
</ul>
</li>
</ul>
<p style="padding-left: 30px;">Both for all the time you&#8217;ve been blogging, and for the last month, it then adds these values in a page on your WordPress dashboard.</p>
<p><a title="Blog Metrics for a single author blog" href="http://yoast.com/wp-content/uploads/2007/12/blog-metrics-single-author-blog.png"><img src="http://yoast.com/wp-content/uploads/2007/12/blog-metrics-single-author-blog.thumbnail.png" alt="Blog Metrics for a single author blog" /></a><a title="Blog metrics per author" href="http://yoast.com/wp-content/uploads/2007/12/per-author-stats.png"><img src="http://yoast.com/wp-content/uploads/2007/12/per-author-stats.thumbnail.png" alt="Blog metrics per author" /></a></p></blockquote>
<p><a href="http://wordpress.org/extend/plugins/search-meter/"><strong>Search Meter</strong></a></p>
<p>This plugin is a must for any blogger. Period.</p>
<blockquote><p>If you have a Search box on your blog, Search Meter automatically records what people are searching for &#8212; and whether they are finding what they are looking for. Search Meter&#8217;s admin interface shows you what people have been searching for in the last couple of days, and in the last week or month. It also shows you which searches have been unsuccessful. If people search your blog and get no results, they&#8217;ll probably go elsewhere. With Search Meter, you&#8217;ll be able to find out what people are searching for, and give them what they want by creating new posts on those topics.  [...]</p></blockquote>
<p><a href="http://wordpress.org/extend/plugins/google-analytics-dashboard/"><strong>Google analytics Dashboard</strong></a></p>
<blockquote><p>Google Analytics Dashboard gives you the ability to view your Google Analytics data in your WordPress dashboard. You can also alow other users to see the same dashboard information when they are logged in or embed parts of the data into posts or as part of your theme.</p></blockquote>
<p>The biggest advantage of this plugin in my view is that it adds <a title="sparklines " href="http://en.wikipedia.org/wiki/Sparkline">sparklines</a> in the &#8220;posts -&gt; edit&#8221; page in the admin area.<br />
<a href="http://wordpress.org/extend/plugins/analytics360/"></a></p>
<p><a href="http://wordpress.org/extend/plugins/analytics360/"><strong>Analytics360</strong></a><br />
I don&#8217;t use this one much. But one feature it has that I find interesting is that is adds information of when you posted something with the trend line of the google analytics traffic data. It also mixes data from MailChimp&#8217;s, which I don&#8217;t use.</p>
<blockquote><p>MailChimp&#8217;s Analytics360 plugin allows you to pull Google Analytics and MailChimp data directly into your dashboard, so you can access robust analytics tools without leaving WordPress.</p></blockquote>
<p><a href="http://wordpress.org/extend/plugins/broken-link-checker/"><strong>Broken Link Checker</strong></a><br />
This plugin is also a must.</p>
<blockquote><p>This plugin will monitor your blog looking for broken links and let you know if any are found.</p>
<ul>
<li>Monitors links in your posts, pages, the blogroll, and custom fields (optional).</li>
<li>Detects links that don&#8217;t work and missing images.</li>
<li>Notifies you on the Dashboard if any are found.</li>
<li>Also detects redirected links.</li>
<li>Makes broken links display differently in posts (optional).</li>
<li>Link checking intervals can be configured.</li>
<li>New/modified posts are checked ASAP.</li>
<li>You view broken links, redirects, and a complete list of links used on your site, in the <em>Tools -&gt; Broken Links</em> tab.</li>
<li>Searching and filtering links by URL, anchor text and so on is also possible.</li>
<li>Each link can be edited or unlinked directly via the plugin&#8217;s page, without manually editing each post.</li>
</ul>
</blockquote>
<p><strong><span style="text-decoration: underline;">Piwik + </span></strong><a href="http://wordpress.org/extend/plugins/wp-piwik/"><strong>WP-Piwik</strong></a></p>
<blockquote><p>This plugin adds a <a href="http://piwik.org/">Piwik </a>stats site to your WordPress dashboard. It&#8217;s also able to add the Piwik tracking code to your blog.<br />
<a title="Piwik " href="http://en.wikipedia.org/wiki/Piwik">Piwik</a> is an open source (GPL licensed) web analytics software program. It provides you with detailed real time reports on your website visitors: the search engines and keywords they used, the language they speak, your popular pages and so on…</p></blockquote>
<p>You can install Piwik more or less like you install WordPress, and then you are left to integrate it into your blog. The only real down side of it for me (compared to google analytics) is the advanced segmentation and pivoting. But in general it is a free, great (and growing!) Web analytics solution.<br />
<a href="http://wordpress.org/extend/plugins/woopra/"></a></p>
<p><a href="http://wordpress.org/extend/plugins/woopra/"><strong>Woopra Analytics Plugin</strong></a><br />
I have been using Woopra since their release thanks to <a href="http://lorelle.wordpress.com/2008/03/30/whooping-woopra-blog-statistics-program/">lorelle</a>. I enjoy the ability to follow the live actions that are happening inside the blog. Although since woopra went from BETA to GOLD, I lost most interest because the total blogs I track have more traffic volume then woopra allow tracking in their free account. But small bloggers could find the service gratifying.</p>
<blockquote><p>Woopra is the world&#8217;s most comprehensive, information rich, easy to use, real-time Web tracking and analysis application.</p>
<p>Features include:</p>
<ul>
<li>Live Tracking and Web Statistics</li>
<li>A rich user interface and client monitoring application</li>
<li>Real-time Analytics</li>
<li>Manage Multiple Blogs and Websites</li>
<li>Deep analytic and search capabilities</li>
<li>Click-to-chat</li>
<li>Visitor and member tagging</li>
<li>Real-time notifications</li>
<li>Easy Installation and Update Notification</li>
</ul>
</blockquote>
<h2>Final notes</h2>
<p>If you are into web analytics, I also encourage you to give the following a try: <a href="http://www.nuconomy.com/">Nuconomy</a>,<a href="http://www.clicktale.com/">ClickTale</a>, <a href="http://crazyegg.com/">Crazy Egg</a>. And of course, <a href="http://www.google.com/analytics/">Google analytics</a>. Each of them (and also Woopra) strips you and your visitors a bit more from their privacy. But that is the ultimate price we pay for the strong Web analytics solutions that exists out there.<br />
If you got any more <strong>statistics plugins</strong> I missed, feel encouraged to share them with me in the comments <img src='http://www.r-statistics.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.r-statistics.com/2010/02/statistics-plugins-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free statistics e-books for download</title>
		<link>http://www.r-statistics.com/2009/10/free-statistics-e-books-for-download/</link>
		<comments>http://www.r-statistics.com/2009/10/free-statistics-e-books-for-download/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 07:31:02 +0000</pubDate>
		<dc:creator>Tal Galili</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[ebook]]></category>
		<category><![CDATA[Jerome Friedman]]></category>
		<category><![CDATA[machine learning]]></category>
		<category><![CDATA[Robert Tibshirani]]></category>
		<category><![CDATA[statistical learning]]></category>
		<category><![CDATA[Trevor Hastie]]></category>

		<guid isPermaLink="false">http://www.r-statistics.com/?p=40</guid>
		<description><![CDATA[This post will eventually grow to hold a wide list of books on statistics (e-books, pdf books and so on) that are available for free download.  But for now we&#8217;ll start off with just one several books: The Elements of Statistical Learning written by Trevor Hastie, Robert Tibshirani and Jerome Friedman. you can legally download a copy of the book in pdf format from the authors website! Direct download (First discovered on the &#8220;one R tip a day&#8221; blog) R [...]]]></description>
			<content:encoded><![CDATA[<p>This post will eventually grow to hold a wide list of books on statistics (e-books, pdf books and so on) that are available for free download.  But for now we&#8217;ll start off with just <span style="text-decoration: line-through;">one </span> several books:</p>
<ul>
<li><em><strong>The Elements of Statistical Learning</strong></em> written by Trevor Hastie, Robert Tibshirani and Jerome Friedman. you can legally download a copy of the book in pdf format from the <a href="http://www-stat.stanford.edu/~tibs/ElemStatLearn/">authors website</a>! <a href="http://www-stat.stanford.edu/~hastie/Papers/ESLII.pdf">Direct download</a> (First discovered on the &#8220;<a href="http://onertipaday.blogspot.com/2009/10/elements-of-statistical-learning.html">one R tip a day</a>&#8221; blog)</li>
<li><strong><em>R related:</em></strong>
<ul>
<li><strong><em>Using R for Introductory Statistics</em></strong> by John Verzani Publisher: Chapman &amp; Hall/CRC 2004 ISBN/ASIN: 1584884509 ISBN-13: 9781584884507 Number of pages: 114 Description: The author presents a self-contained treatment of statistical topics and the intricacies of the R software. The book treats exploratory data analysis with more attention than is typical, includes a chapter on simulation, and provides a unified approach to linear models. This text lays the foundation for further study and development in statistics using R. <a href="http://cran.r-project.org/doc/contrib/Verzani-SimpleR.pdf"><strong>Download link</strong></a></li>
<li><strong><em>R Graphics</em></strong> (Three chapters only) by Paul Murrell ISBN:  9781584884866 ISBN 10:  158488486X Publication Date:  July 29, 2005 Number of Pages:  328 Description: Chapter 1: An Introduction to R Graphics Chapter 4: Trellis Graphics: The Lattice Package Chapter 5: The Grid Graphics Model <a href="http://www.stat.auckland.ac.nz/~paul/RGraphics/RGraphicsChapters-1-4-5.pdf"><strong>Download link</strong></a> (see scripts and images <a href="http://www.stat.auckland.ac.nz/~paul/RGraphics/rgraphics.html">here</a>)</li>
<li><strong><em>Using R</em></strong> <a href="http://cran.r-project.org/doc/contrib/usingR.pdf"><strong>Download link</strong></a></li>
<li><strong><em>R intro</em></strong> <strong><a href="http://cran.r-project.org/doc/manuals/R-intro.pdf">Download link</a></strong></li>
<li><em><strong>Psychometric Theory with Applications in R</strong></em> by William Revelle (a work in progress) <a rel="nofollow" href="http://www.personality-project.org/r/book/"><strong>Download link</strong></a></li>
<li>A great long list of R related texts, for free download, can be <a href="http://cran.r-project.org/other-docs.html#english">found here</a>.</li>
<li><strong><em>Using Graphs Instead of Tables</strong></em> <a href="http://tables2graphs.com/doku.php"><strong>website link</strong></a>  (This web page accompanies the article &#8220;Using Graphs Instead of Tables in Political Science&#8221;, by Jonathan Kastellec and Eduardo Leoni, which appears in the December 2007 issue of Perspectives on Politics. It contains complete replication code for all the graphs that appear in the text)</li>
</ul>
</li>
<p><a href="http://www.stat.auckland.ac.nz/~paul/RGraphics/RGraphicsChapters-1-4-5.pdf"></a></ul>
<p>* * *</p>
<p><em>Know of any more e-books freely available for download? Please write to us about them in the comments.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.r-statistics.com/2009/10/free-statistics-e-books-for-download/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>What is R?</title>
		<link>http://www.r-statistics.com/2009/03/what-is-r/</link>
		<comments>http://www.r-statistics.com/2009/03/what-is-r/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 19:29:30 +0000</pubDate>
		<dc:creator>Tal Galili</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[about]]></category>
		<category><![CDATA[intro]]></category>
		<category><![CDATA[statistics]]></category>

		<guid isPermaLink="false">http://www.r-statistics.com/?p=1</guid>
		<description><![CDATA[Highlights R is a free software environment for statistical computing and graphics. It compiles and runs on a wide variety of UNIX platforms, Windows and MacOS.   If you wish to download R, please choose your preferred CRAN mirror. The R language has become a de facto standard among statisticians for the development of statistical software,and is widely used for statistical software development and data analysis. Basic questions about R like how to download and install the software, or what the license [...]]]></description>
			<content:encoded><![CDATA[<h3>Highlights</h3>
<ul>
<li>R is a free software environment for statistical computing and graphics. It compiles and runs on a wide variety of UNIX platforms, Windows and MacOS.   If you wish to <strong><a href="http://cran.r-project.org/mirrors.html">download R</a></strong>, please choose your preferred <a href="http://cran.r-project.org/mirrors.html">CRAN mirror</a>.</li>
<li>The R language has become a de facto standard among statisticians for the development of statistical software,and is widely used for statistical software development and data analysis.</li>
<li>Basic questions about R like how to download and install the software, or what the license terms are, are answered in the <a href="http://cran.r-project.org/faqs.html">answers to frequently asked questions</a> section.</li>
</ul>
<h3>Introduction to R</h3>
<p>R is a language and environment for statistical computing and graphics.  R provides a wide variety of statistical (linear and nonlinear modelling, classical statistical tests, time-series analysis, classification, clustering, &#8230;) and graphical techniques, and is highly extensible.</p>
<p>One of R&#8217;s strengths is the ease with which well-designed publication-quality plots can be produced, including mathematical symbols and formulae where needed. Great care has been taken over the defaults for the minor design choices in graphics, but the user retains full control.</p>
<p>R is available as Free Software under the terms of the <a href="http://www.gnu.org/" target="_top">Free Software Foundation</a>&#8216;s <a href="http://www.r-project.org/COPYING">GNU General Public License</a> in source code form. It compiles and runs on a wide variety of UNIX platforms and similar systems (including FreeBSD and Linux), Windows and MacOS.</p>
<h3>R and S</h3>
<p>R is a <a href="http://www.gnu.org/" target="_top">GNU project</a> which is similar to the S language and environment which was developed at Bell Laboratories (formerly AT&amp;T, now Lucent Technologies) by John Chambers and colleagues.  R can be considered as a different implementation of S.  There are some important differences, but much code written for S runs unaltered under R. The S language is often the vehicle of choice for research in statistical methodology, and R provides an Open Source route to participation in that activity.</p>
<h3>The R environment </h3>
<p>R is an integrated suite of software facilities for data manipulation, calculation and graphical display. It includes</p>
<ul>
<li>an effective data handling and storage facility,</li>
<li>a suite of operators for calculations on arrays, in particular matrices,</li>
<li>a large, coherent, integrated collection of intermediate tools for data analysis,</li>
<li>graphical facilities for data analysis and display either on-screen or on hardcopy, and</li>
<li>a well-developed, simple and effective programming language which includes conditionals, loops, user-defined recursive functions and input and output facilities.</li>
</ul>
<p>The term &#8220;environment&#8221; is intended to characterize it as a fully planned and coherent system, rather than an incremental accretion of very specific and inflexible tools, as is frequently the case with other data analysis software.</p>
<p>R, like S, is designed around a true computer language, and it allows users to add additional functionality by defining new functions. Much of the system is itself written in the R dialect of S, which makes it easy for users to follow the algorithmic choices made. For computationally-intensive tasks, C, C++ and Fortran code can be linked and called at run time. Advanced users can write C code to manipulate R objects directly.</p>
<p>Many users think of R as a statistics system. We prefer to think of it of an environment within which statistical techniques are implemented.  R can be extended (easily) via <em>packages</em>. There are about eight packages supplied with the R distribution and many more are available through the CRAN family of Internet sites covering a very wide range of modern statistics.</p>
<p>R has its own LaTeX-like documentation format, which is used to supply comprehensive documentation, both on-line in a number of formats and in hardcopy.</p>
<p>(credit: the R <a href="http://www.r-project.org/about.html">about page</a> and the Wikipedia article <a href="http://en.wikipedia.org/wiki/R_(programming_language)">R (programming language)</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.r-statistics.com/2009/03/what-is-r/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
