S t e p h e n H u c k e r (Posts about R)http://stephenhucker.com/blog/enSun, 20 May 2018 16:46:13 GMTNikola (getnikola.com)http://blogs.law.harvard.edu/tech/rssLearning Statshttp://stephenhucker.com/blog/posts/Learning%20Stats/Stephen Hucker<div><p>I have learnt the hard way that for me to learn something new, I must <strong>practice</strong> what I am learning.</p>
<p>I want to learn statistics and there is a great course on<a href="https://www.coursera.org/specializations/statistics"> Stats taught using the R language</a>.</p>
<p>Now I much prefer Python and Pandas to R, there arn't that many good course teaching stats using Python.
From a pedagogical viewpoint I learn best when I make detailed notes about what I learn each week. When doing an online course you can't publish your notes on your blog b/c it contains the answers, so other students could cheat.
Solution: Publish the answer in Python on my blog
That way I get a good overview of the strengths and weakness of each language.</p>
<p>Master Statistics with R</p>
<p><em>Statistical mastery of data analysis including inference, modeling, and Bayesian approaches.</em></p>
<blockquote>
<p>In this Specialization, you will learn to analyze and visualize data in R and created reproducible data analysis reports, demonstrate a conceptual understanding of the unified nature of statistical inference, perform frequentist and Bayesian statistical inference and modeling to understand natural phenomena and make data-based decisions, communicate statistical results correctly, effectively, and in context without relying on statistical jargon, critique data-based claims and evaluated data-based decisions, and wrangle and visualize data with R packages for data analysis.</p>
<p>You will produce a portfolio of data analysis projects from the Specialization that demonstrates mastery of statistical data analysis from exploratory analysis to inference to modeling, suitable for applying for statistical analysis or data scientist positions.</p>
</blockquote>
<p>The first course is <strong>Introduction to Probability and Data</strong></p>
<p>About the Course</p>
<blockquote>
<p>This course introduces you to sampling and exploring data, as well as basic probability theory and Bayes' rule. You will examine various types of sampling methods, and discuss how such methods can impact the scope of inference. A variety of exploratory data analysis techniques will be covered, including numeric summary statistics and basic data visualization. You will be guided through installing and using R and RStudio (free statistical software), and will use this software for lab exercises and a final project. The concepts and techniques in this course will serve as building blocks for the inference and modeling courses in the Specialization.</p>
</blockquote></div>Rstatisticshttp://stephenhucker.com/blog/posts/Learning%20Stats/Wed, 22 Mar 2017 13:00:00 GMTData Scientistâ€™s Toolboxhttp://stephenhucker.com/blog/posts/data-scientists-toolbox/Stephen Hucker<div><p>Finally completed my first course in Stats and R programming from John Hopkins University - <a href="https://www.coursera.org/course/datascitoolbox" title="good intro, future courses much harder">The Data Scientistâ€™s Toolbox</a> </p>
<p>It was pretty easy, the next course is an intro to R, which I have done before, but did not complete the homework.
It will be a little bit more work as I still have to wrap my mind around R. I really, really hate it syntax compared to Python.</p></div>Rstatisticshttp://stephenhucker.com/blog/posts/data-scientists-toolbox/Wed, 09 Jul 2014 13:06:00 GMTTest Post using Pelicanhttp://stephenhucker.com/blog/posts/test-post-using-python/Stephen Hucker<div><h3>Shit, I Didn't Make a Wordpress Export File</h3>
<p>So how do I export my wordpress blog?
I have a dump of the folder of the site and a SQL export file, but not the specific xml exportfile supported by wordpress</p>
<p>A block of text.</p>
<pre class="code literal-block"><span></span><span class="c1"># Converts iTunes time to a human readable string</span>
<span class="k">def</span> <span class="nf">intToTime</span><span class="p">(</span><span class="n">time</span><span class="p">):</span>
<span class="n">milli</span> <span class="o">=</span> <span class="n">time</span> <span class="o">%</span> <span class="mi">1000</span>
<span class="n">time</span> <span class="o">=</span> <span class="n">time</span> <span class="o">/</span> <span class="mi">1000</span>
<span class="n">seconds</span> <span class="o">=</span> <span class="n">time</span> <span class="o">%</span> <span class="mi">60</span>
<span class="n">time</span> <span class="o">=</span> <span class="n">time</span> <span class="o">/</span> <span class="mi">60</span>
<span class="n">minutes</span> <span class="o">=</span> <span class="n">time</span> <span class="o">%</span> <span class="mi">60</span>
<span class="n">time</span> <span class="o">=</span> <span class="n">time</span> <span class="o">/</span> <span class="mi">60</span>
<span class="n">hours</span> <span class="o">=</span> <span class="n">time</span> <span class="o">%</span> <span class="mi">24</span>
<span class="n">time</span> <span class="o">=</span> <span class="n">time</span> <span class="o">/</span> <span class="mi">24</span>
<span class="n">days</span> <span class="o">=</span> <span class="n">time</span>
<span class="k">return</span> <span class="s1">'{}:{}:{}:{}.{}'</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">days</span><span class="p">,</span><span class="n">hours</span><span class="p">,</span><span class="n">minutes</span><span class="p">,</span><span class="n">seconds</span><span class="p">,</span><span class="n">milli</span><span class="p">)</span>
</pre>
<p>More random text within blog</p>
<p>Some R Code</p>
<pre class="code literal-block"><span></span><span class="o">></span> <span class="kn">source</span><span class="p">(</span><span class="s">"http://www.openintro.org/stat/data/cdc.R"</span><span class="p">)</span>
<span class="o">></span> View<span class="p">(</span>cdc<span class="p">)</span>
<span class="o">></span> <span class="kp">names</span><span class="p">(</span>cdc<span class="p">)</span>
<span class="p">[</span><span class="m">1</span><span class="p">]</span> <span class="s">"genhlth"</span> <span class="s">"exerany"</span> <span class="s">"hlthplan"</span> <span class="s">"smoke100"</span> <span class="s">"height"</span> <span class="s">"weight"</span> <span class="s">"wtdesire"</span> <span class="s">"age"</span>
<span class="p">[</span><span class="m">9</span><span class="p">]</span> <span class="s">"gender"</span>
<span class="o">></span> <span class="kp">head</span><span class="p">(</span>cdc<span class="p">)</span>
genhlth exerany hlthplan smoke100 height weight wtdesire age gender
<span class="m">1</span> good <span class="m">0</span> <span class="m">1</span> <span class="m">0</span> <span class="m">70</span> <span class="m">175</span> <span class="m">175</span> <span class="m">77</span> m
<span class="m">2</span> good <span class="m">0</span> <span class="m">1</span> <span class="m">1</span> <span class="m">64</span> <span class="m">125</span> <span class="m">115</span> <span class="m">33</span> f
<span class="m">3</span> good <span class="m">1</span> <span class="m">1</span> <span class="m">1</span> <span class="m">60</span> <span class="m">105</span> <span class="m">105</span> <span class="m">49</span> f
<span class="m">4</span> good <span class="m">1</span> <span class="m">1</span> <span class="m">0</span> <span class="m">66</span> <span class="m">132</span> <span class="m">124</span> <span class="m">42</span> f
<span class="m">5</span> very good <span class="m">0</span> <span class="m">1</span> <span class="m">0</span> <span class="m">61</span> <span class="m">150</span> <span class="m">130</span> <span class="m">55</span> f
<span class="m">6</span> very good <span class="m">1</span> <span class="m">1</span> <span class="m">0</span> <span class="m">64</span> <span class="m">114</span> <span class="m">114</span> <span class="m">55</span> f
</pre>
<p>The end of this test post.</p></div>markdownpelicanpythonRhttp://stephenhucker.com/blog/posts/test-post-using-python/Wed, 05 Mar 2014 15:31:00 GMT