<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/monte-carlo-techniques-to-create-counterfactuals/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://freakonometrics.hypotheses.org/55716"> R-english – Freakonometrics</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>In the previous <a rel="nofollow" href="https://freakonometrics.hypotheses.org/category/courses/stt5100/2018-automne" target="_blank">STT5100 course</a>, last week, we’ve seen how to use monte carlo simulations. The idea is that we do observe in statistics a sample <img alt="\{y_1,\cdots,y_n\}" title="\{y_1,\cdots,y_n\}" src="https://s0.wp.com/latex.php?latex=%5C%7By_1%2C%5Ccdots%2Cy_n%5C%7D&bg=ffffff&fg=000&s=0" class="latex">, and more generally, in econometrics <img alt="\{(y_1,\mathbf{x}_1),\cdots,(y_n,\mathbf{x}_n)\}" title="\{(y_1,\mathbf{x}_1),\cdots,(y_n,\mathbf{x}_n)\}" src="https://s0.wp.com/latex.php?latex=%5C%7B%28y_1%2C%5Cmathbf%7Bx%7D_1%29%2C%5Ccdots%2C%28y_n%2C%5Cmathbf%7Bx%7D_n%29%5C%7D&bg=ffffff&fg=000&s=0" class="latex">. But let’s get back to statistics (without covariates) to illustrate. We assume that observations <img alt="y_i" title="y_i" src="https://s0.wp.com/latex.php?latex=y_i&bg=ffffff&fg=000&s=0" class="latex"> are realizations of an underlying random variable <img alt="Y_i" title="Y_i" src="https://s0.wp.com/latex.php?latex=Y_i&bg=ffffff&fg=000&s=0" class="latex">. We assume that <img alt="Y_i" title="Y_i" src="https://s0.wp.com/latex.php?latex=Y_i&bg=ffffff&fg=000&s=0" class="latex"> are i.id. random variables, with (unkown) distribution <img alt="F_{\theta}" title="F_{\theta}" src="https://s0.wp.com/latex.php?latex=F_%7B%5Ctheta%7D&bg=ffffff&fg=000&s=0" class="latex">. Consider here some estimator <img alt="\widehat{\theta}" title="\widehat{\theta}" src="https://s0.wp.com/latex.php?latex=%5Cwidehat%7B%5Ctheta%7D&bg=ffffff&fg=000&s=0" class="latex"> – which is just a function of our sample <img alt="\widehat{\theta}=h(y_1,\cdots,y_n)" title="\widehat{\theta}=h(y_1,\cdots,y_n)" src="https://s0.wp.com/latex.php?latex=%5Cwidehat%7B%5Ctheta%7D%3Dh%28y_1%2C%5Ccdots%2Cy_n%29&bg=ffffff&fg=000&s=0" class="latex">. So <img alt="\widehat{\theta}" title="\widehat{\theta}" src="https://s0.wp.com/latex.php?latex=%5Cwidehat%7B%5Ctheta%7D&bg=ffffff&fg=000&s=0" class="latex"> is a real-valued number like <img alt="" src="https://i0.wp.com/freakonometrics.hypotheses.org/files/2018/10/t1.gif?w=456&ssl=1" data-recalc-dims="1">. Then, in mathematical statistics, in order to derive properties of the estimator <img alt="\widehat{\theta}" title="\widehat{\theta}" src="https://s0.wp.com/latex.php?latex=%5Cwidehat%7B%5Ctheta%7D&bg=ffffff&fg=000&s=0" class="latex">, like a confidence interval, we must define <img alt="\widehat{\theta}=h(Y_1,\cdots,Y_n)" title="\widehat{\theta}=h(Y_1,\cdots,Y_n)" src="https://s0.wp.com/latex.php?latex=%5Cwidehat%7B%5Ctheta%7D%3Dh%28Y_1%2C%5Ccdots%2CY_n%29&bg=ffffff&fg=000&s=0" class="latex">, so that now, <img alt="\widehat{\theta}" title="\widehat{\theta}" src="https://s0.wp.com/latex.php?latex=%5Cwidehat%7B%5Ctheta%7D&bg=ffffff&fg=000&s=0" class="latex"> is a real-valued random variable. What is puzzling for students, is that we use the same notation, and I have to agree, that’s not very clever. So now, <img alt="\widehat{\theta}" title="\widehat{\theta}" src="https://s0.wp.com/latex.php?latex=%5Cwidehat%7B%5Ctheta%7D&bg=ffffff&fg=000&s=0" class="latex"> is <img alt="" src="https://i1.wp.com/freakonometrics.hypotheses.org/files/2018/10/theta.gif?w=456&ssl=1" data-recalc-dims="1">.</p>
<p>There are two strategies here. In classical statistics, we use probability theorem, to derive properties of <img alt="\widehat{\theta}" title="\widehat{\theta}" src="https://s0.wp.com/latex.php?latex=%5Cwidehat%7B%5Ctheta%7D&bg=ffffff&fg=000&s=0" class="latex"> (the random variable) : at least the first two moments, but if possible the distribution. An alternative is to go for computational statistics. We have only one sample, <img alt="\{y_1,\cdots,y_n\}" title="\{y_1,\cdots,y_n\}" src="https://s0.wp.com/latex.php?latex=%5C%7By_1%2C%5Ccdots%2Cy_n%5C%7D&bg=ffffff&fg=000&s=0" class="latex">, and that’s a pity. But maybe we can create another one <img alt="\{y_1^{(1)},\cdots,y_n^{(1)}\}" title="\{y_1^{(1)},\cdots,y_n^{(1)}\}" src="https://s0.wp.com/latex.php?latex=%5C%7By_1%5E%7B%281%29%7D%2C%5Ccdots%2Cy_n%5E%7B%281%29%7D%5C%7D&bg=ffffff&fg=000&s=0" class="latex">, as realizations of <img alt="F_{\theta}" title="F_{\theta}" src="https://s0.wp.com/latex.php?latex=F_%7B%5Ctheta%7D&bg=ffffff&fg=000&s=0" class="latex">, and another one <img alt="\{y_1^{(2)},\cdots,y_n^{(2)}\}" title="\{y_1^{(2)},\cdots,y_n^{(2)}\}" src="https://s0.wp.com/latex.php?latex=%5C%7By_1%5E%7B%282%29%7D%2C%5Ccdots%2Cy_n%5E%7B%282%29%7D%5C%7D&bg=ffffff&fg=000&s=0" class="latex">, anoter one <img alt="\{y_1^{(3)},\cdots,y_n^{(3)}\}" title="\{y_1^{(3)},\cdots,y_n^{(3)}\}" src="https://s0.wp.com/latex.php?latex=%5C%7By_1%5E%7B%283%29%7D%2C%5Ccdots%2Cy_n%5E%7B%283%29%7D%5C%7D&bg=ffffff&fg=000&s=0" class="latex">, etc. From those counterfactuals, we can now get a collection of estimators, <img alt="\widehat{\theta}^{(1)}" title="\widehat{\theta}^{(1)}" src="https://s0.wp.com/latex.php?latex=%5Cwidehat%7B%5Ctheta%7D%5E%7B%281%29%7D&bg=ffffff&fg=000&s=0" class="latex">,<img alt="\widehat{\theta}^{(2)}" title="\widehat{\theta}^{(2)}" src="https://s0.wp.com/latex.php?latex=%5Cwidehat%7B%5Ctheta%7D%5E%7B%282%29%7D&bg=ffffff&fg=000&s=0" class="latex">, <img alt="\widehat{\theta}^{(3)}" title="\widehat{\theta}^{(3)}" src="https://s0.wp.com/latex.php?latex=%5Cwidehat%7B%5Ctheta%7D%5E%7B%283%29%7D&bg=ffffff&fg=000&s=0" class="latex">, etc. Instead of using mathematical tricks to calculate <img alt="\mathbb{E}(\widehat{\theta})" title="\mathbb{E}(\widehat{\theta})" src="https://s0.wp.com/latex.php?latex=%5Cmathbb%7BE%7D%28%5Cwidehat%7B%5Ctheta%7D%29&bg=ffffff&fg=000&s=0" class="latex">, compute <img alt="\frac{1}{k}\sum_{s=1}^k\widehat{\theta}^{(s)}" title="\frac{1}{k}\sum_{s=1}^k\widehat{\theta}^{(s)}" src="https://s0.wp.com/latex.php?latex=%5Cfrac%7B1%7D%7Bk%7D%5Csum_%7Bs%3D1%7D%5Ek%5Cwidehat%7B%5Ctheta%7D%5E%7B%28s%29%7D&bg=ffffff&fg=000&s=0" class="latex">That’s what we’ve seen last friday.</p>
<p>I did also mention briefly that looking at densities is lovely, but not very useful to assess goodness of fit, to test for normality, for instance. In this post, I just wanted to illustrate this point. And actually, creating counterfactuals can we a good way to see it. Consider here the height of male students,</p>
<div><table><tr><td><pre>1
2
3
4
</pre></td><td><pre>Davis<span>=</span><span>read.<span>table</span></span><span>(</span>
  <span>&quot;http://socserv.socsci.mcmaster.ca/jfox/Books/Applied-Regression-2E/datasets/Davis.txt&quot;</span><span>)</span>
Davis<span>[</span><span>12</span>,<span>c</span><span>(</span><span>2</span>,<span>3</span><span>)</span><span>]</span><span>=</span>Davis<span>[</span><span>12</span>,<span>c</span><span>(</span><span>3</span>,<span>2</span><span>)</span><span>]</span>
X<span>=</span>Davis$height<span>[</span>Davis$sex<span>==</span><span>&quot;M&quot;</span><span>]</span></pre></td></tr></table></div>
<p>We can visualize its distribution (density and cumulative distribution)</p>
<div><table><tr><td><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td><pre>u<span>=</span><span>seq</span><span>(</span><span>155</span>,<span>205</span>,<span>by</span><span>=</span>.5<span>)</span>
<span>par</span><span>(</span>mfrow<span>=</span><span>c</span><span>(</span><span>1</span>,<span>2</span><span>)</span><span>)</span>
<span>hist</span><span>(</span>X,<span>col</span><span>=</span><span>rgb</span><span>(</span><span>0</span>,<span>0</span>,<span>1</span>,.3<span>)</span><span>)</span>
<span>lines</span><span>(</span><span>density</span><span>(</span>X<span>)</span>,<span>col</span><span>=</span><span>&quot;blue&quot;</span>,lwd<span>=</span><span>2</span><span>)</span>
<span>lines</span><span>(</span>u,<span>dnorm</span><span>(</span>u,<span>178</span>,<span>6.5</span><span>)</span>,<span>col</span><span>=</span><span>&quot;black&quot;</span><span>)</span>
Xs<span>=</span><span>sort</span><span>(</span>X<span>)</span>
n<span>=</span><span>length</span><span>(</span>X<span>)</span>
p<span>=</span><span>(</span><span>1</span><span>:</span>n<span>)</span><span>/</span><span>(</span>n<span>+</span><span>1</span><span>)</span>
<span>plot</span><span>(</span>Xs,p,type<span>=</span><span>&quot;s&quot;</span>,<span>col</span><span>=</span><span>&quot;blue&quot;</span><span>)</span>
<span>lines</span><span>(</span>u,<span>pnorm</span><span>(</span>u,<span>178</span>,<span>6.5</span><span>)</span>,<span>col</span><span>=</span><span>&quot;black&quot;</span><span>)</span></pre></td></tr></table></div>
<p><img alt="" src="https://i1.wp.com/freakonometrics.hypotheses.org/files/2018/10/taille.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>Since it looks like a normal distribution, we can add the density a Gaussian distribution on the left, and the cdf on the right. Why not test it properly. To be a little bit more specific, I do not want to test if it’s a Gaussian distribution, but if it’s a <img alt="\mathcal{N}(178,6.5^2)" title="\mathcal{N}(178,6.5^2)" src="https://s0.wp.com/latex.php?latex=%5Cmathcal%7BN%7D%28178%2C6.5%5E2%29&bg=ffffff&fg=000&s=0" class="latex">. In order to see if this distribution is relevant, one can use monte carlo simulations to create conterfactuals</p>
<div><table><tr><td><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td><pre><span>hist</span><span>(</span>X,<span>col</span><span>=</span><span>rgb</span><span>(</span><span>0</span>,<span>0</span>,<span>1</span>,.3<span>)</span><span>)</span>
<span>lines</span><span>(</span><span>density</span><span>(</span>X<span>)</span>,<span>col</span><span>=</span><span>&quot;blue&quot;</span>,lwd<span>=</span><span>2</span><span>)</span>
  Y<span>=</span><span>rnorm</span><span>(</span>n,<span>178</span>,<span>6.5</span><span>)</span>
  <span>hist</span><span>(</span>Y,<span>col</span><span>=</span><span>rgb</span><span>(</span><span>1</span>,<span>0</span>,<span>0</span>,.3<span>)</span><span>)</span>
  <span>lines</span><span>(</span><span>density</span><span>(</span>Y<span>)</span>,<span>col</span><span>=</span><span>&quot;red&quot;</span>,lwd<span>=</span><span>2</span><span>)</span>
Ys<span>=</span><span>sort</span><span>(</span>Y<span>)</span>
<span>plot</span><span>(</span>Xs,p,type<span>=</span><span>&quot;s&quot;</span>,<span>col</span><span>=</span><span>&quot;white&quot;</span>,lwd<span>=</span><span>2</span>,axes<span>=</span>FALSE,xlab<span>=</span><span>&quot;&quot;</span>,ylab<span>=</span><span>&quot;&quot;</span>,xlim<span>=</span><span>c</span><span>(</span><span>155</span>,<span>205</span><span>)</span><span>)</span>
<span>polygon</span><span>(</span><span>c</span><span>(</span>Xs,<span>rev</span><span>(</span>Ys<span>)</span><span>)</span>,<span>c</span><span>(</span>p,<span>rev</span><span>(</span>p<span>)</span><span>)</span>,<span>col</span><span>=</span><span>&quot;yellow&quot;</span>,border<span>=</span>NA<span>)</span>
<span>lines</span><span>(</span>Xs,p,type<span>=</span><span>&quot;s&quot;</span>,<span>col</span><span>=</span><span>&quot;blue&quot;</span>,lwd<span>=</span><span>2</span><span>)</span>
<span>lines</span><span>(</span>Ys,p,type<span>=</span><span>&quot;s&quot;</span>,<span>col</span><span>=</span><span>&quot;red&quot;</span>,lwd<span>=</span><span>2</span><span>)</span></pre></td></tr></table></div>
<p><img alt="" src="https://i2.wp.com/freakonometrics.hypotheses.org/files/2018/10/dessin-ks.gif?w=456&ssl=1" data-recalc-dims="1"></p>
<p>We can see on the left that it is hard to assess normality from the density (histogram and also <a rel="nofollow" href="https://en.wikipedia.org/wiki/Kernel_density_estimation" target="_blank">kernel based</a> density estimator). One can hardly think of a valid distance, between two densities. But if we look at graph on the right, we can compare the empirical distribution cumulative distribution <img alt="\widehat{F}" title="\widehat{F}" src="https://s0.wp.com/latex.php?latex=%5Cwidehat%7BF%7D&bg=ffffff&fg=000&s=0" class="latex"> obtained from <img alt="\{y_1,\cdots,y_n\}" title="\{y_1,\cdots,y_n\}" src="https://s0.wp.com/latex.php?latex=%5C%7By_1%2C%5Ccdots%2Cy_n%5C%7D&bg=ffffff&fg=000&s=0" class="latex"> (the blue curve), and some conterfactual, <img alt="\widehat{F}^{(s)}" title="\widehat{F}^{(s)}" src="https://s0.wp.com/latex.php?latex=%5Cwidehat%7BF%7D%5E%7B%28s%29%7D&bg=ffffff&fg=000&s=0" class="latex"> obtained from <img alt="\{y_1^{(s)},\cdots,y_n^{(s)}\}" title="\{y_1^{(s)},\cdots,y_n^{(s)}\}" src="https://s0.wp.com/latex.php?latex=%5C%7By_1%5E%7B%28s%29%7D%2C%5Ccdots%2Cy_n%5E%7B%28s%29%7D%5C%7D&bg=ffffff&fg=000&s=0" class="latex"> generated from <img alt="F_{\theta_0}" title="F_{\theta_0}" src="https://s0.wp.com/latex.php?latex=F_%7B%5Ctheta_0%7D&bg=ffffff&fg=000&s=0" class="latex"> – where <img alt="\theta_0" title="\theta_0" src="https://s0.wp.com/latex.php?latex=%5Ctheta_0&bg=ffffff&fg=000&s=0" class="latex"> is the value we want to test. As suggested above, we can compute the yellow area, as suggest in <a rel="nofollow" href="https://en.wikipedia.org/wiki/Cram%C3%A9r%E2%80%93von_Mises_criterion" target="_blank">Cramer-von Mises</a> test, or the <a rel="nofollow" href="https://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test" target="_blank">Kolmogorov-Smirnov</a> distance.</p>
<div><table><tr><td><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td><pre>d<span>=</span><span>rep</span><span>(</span>NA,1e5<span>)</span>
<span>for</span><span>(</span>s <span>in</span> <span>1</span><span>:</span>1e5<span>)</span><span>{</span>
d<span>[</span>s<span>]</span><span>=</span><span>ks.<span>test</span></span><span>(</span><span>rnorm</span><span>(</span>n,<span>178</span>,<span>6.5</span><span>)</span>,<span>&quot;pnorm&quot;</span>,<span>178</span>,<span>6.5</span><span>)</span>$statistic
<span>}</span>
ds<span>=</span><span>density</span><span>(</span>d<span>)</span>
<span>plot</span><span>(</span>ds,xlab<span>=</span><span>&quot;&quot;</span>,ylab<span>=</span><span>&quot;&quot;</span><span>)</span>
dks<span>=</span><span>ks.<span>test</span></span><span>(</span>X,<span>&quot;pnorm&quot;</span>,<span>178</span>,<span>6.5</span><span>)</span>$statistic
id<span>=</span><span>which</span><span>(</span>ds$x<span>&amp;</span>gt<span>;</span>dks<span>)</span>
<span>polygon</span><span>(</span><span>c</span><span>(</span>ds$x<span>[</span>id<span>]</span>,<span>rev</span><span>(</span>ds$x<span>[</span>id<span>]</span><span>)</span><span>)</span>,<span>c</span><span>(</span>ds$y<span>[</span>id<span>]</span>,<span>rep</span><span>(</span><span>0</span>,<span>length</span><span>(</span>id<span>)</span><span>)</span><span>)</span>,<span>col</span><span>=</span><span>rgb</span><span>(</span><span>1</span>,<span>0</span>,<span>0</span>,.4<span>)</span>,border<span>=</span>NA<span>)</span>
<span>abline</span><span>(</span>v<span>=</span>dks,<span>col</span><span>=</span><span>&quot;red&quot;</span><span>)</span></pre></td></tr></table></div>
<p><img src="https://i0.wp.com/freakonometrics.hypotheses.org/files/2018/10/ks-simu.png?resize=246%2C213&ssl=1" alt="" width="246" data-recalc-dims="1" height="213"></p>
<p>If we draw 10,000 counterfactual samples, we can visualize the distribution (here the density) of the distance used a test statistic <img alt="\widehat{d}^{(1)}" title="\widehat{d}^{(1)}" src="https://s0.wp.com/latex.php?latex=%5Cwidehat%7Bd%7D%5E%7B%281%29%7D&bg=ffffff&fg=000&s=0" class="latex">, <img alt="\widehat{d}^{(2)}" title="\widehat{d}^{(2)}" src="https://s0.wp.com/latex.php?latex=%5Cwidehat%7Bd%7D%5E%7B%282%29%7D&bg=ffffff&fg=000&s=0" class="latex">, etc, and compare it with the one observe on our sample <img alt="\widehat{d}" title="\widehat{d}" src="https://s0.wp.com/latex.php?latex=%5Cwidehat%7Bd%7D&bg=ffffff&fg=000&s=0" class="latex">. The proportion of samples where the test-statistics exceeded the one observed</p>
<div><table><tr><td><pre>1
2
</pre></td><td><pre><span>mean</span><span>(</span>d<span>&amp;</span>gt<span>;</span>dks<span>)</span>
<span>[</span><span>1</span><span>]</span> <span>0.78248</span></pre></td></tr></table></div>
<p>is the computational version of the <img alt="p" title="p" src="https://s0.wp.com/latex.php?latex=p&bg=ffffff&fg=000&s=0" class="latex">-value</p>
<div><table><tr><td><pre>1
2
3
4
5
6
7
</pre></td><td><pre><span>ks.<span>test</span></span><span>(</span>X,<span>&quot;pnorm&quot;</span>,<span>178</span>,<span>6.5</span><span>)</span>
 
	One<span>-</span><span>sample</span> Kolmogorov<span>-</span>Smirnov test
 
<span>data</span><span>:</span>  X
<span>D</span> <span>=</span> <span>0.068182</span>, p<span>-</span>value <span>=</span> <span>0.8079</span>
alternative hypothesis<span>:</span> two<span>-</span>sided</pre></td></tr></table></div>
<p>I thought about all that a couple of days ago, since I got invited for a panel discussion on “coding”, and why “coding” helped me as professor. And this is precisely why I like coding : in statistics, either manipulate abstract objects, like random variables, or you actually use some lines of code to create counterfactuals, and generate fake samples, to quantify uncertainty. The later is interesting, because it helps to visualize complex quantifies. I do not claim that maths is useless, but coding is really nice, as a starting point, to understand what we talk about (which can be very usefull when there is a lot of confusion on notations).</p>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://freakonometrics.hypotheses.org/55716"> R-english – Freakonometrics</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/ExtL6lmYGCM" height="1"></a></div>