<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Disqus - Latest Comments for andrewheiss</title><link>http://disqus.com/by/andrewheiss/</link><description></description><atom:link href="http://disqus.com/andrewheiss/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 29 Nov 2022 00:25:13 -0000</lastBuildDate><item><title>Re: A guide to working with country-year panel data and Bayesian multilevel models | Andrew Heiss</title><link>https://www.andrewheiss.com/blog/2021/12/01/multilevel-models-panel-data-guide/#comment-6052577844</link><description>&lt;p&gt;For (1), check out chapters 15–17 of &lt;i&gt;Bayes Rules&lt;/i&gt; (&lt;a href="https://www.bayesrulesbook.com/chapter-15.html)" rel="nofollow noopener" target="_blank" title="https://www.bayesrulesbook.com/chapter-15.html)"&gt;https://www.bayesrulesbook....&lt;/a&gt;, which has the best overview of multilevel models I've found (even if you don't use Bayesian methods). They cover the b_0 offset notation (see 16.3.2: &lt;a href="https://www.bayesrulesbook.com/chapter-16.html#another-way-to-think-about-it)" rel="nofollow noopener" target="_blank" title="https://www.bayesrulesbook.com/chapter-16.html#another-way-to-think-about-it)"&gt;https://www.bayesrulesbook....&lt;/a&gt; as well as an alternative type of notation for random effects&lt;/p&gt;&lt;p&gt;For (2), multilevel models in general (both frequentist and Bayesian) don't really use robust se (see &lt;a href="https://statmodeling.stat.columbia.edu/2007/11/28/clustered_stand/)" rel="nofollow noopener" target="_blank" title="https://statmodeling.stat.columbia.edu/2007/11/28/clustered_stand/)"&gt;https://statmodeling.stat.c...&lt;/a&gt;. Rather than account for the clustered structure of the data through the standard errors, the multilevel approach models the clustering directly&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Tue, 29 Nov 2022 00:25:13 -0000</pubDate></item><item><title>Re: A guide to working with country-year panel data and Bayesian multilevel models | Andrew Heiss</title><link>https://www.andrewheiss.com/blog/2021/12/01/multilevel-models-panel-data-guide/#comment-5983480949</link><description>&lt;p&gt;Oh neat! I hadn't seen the performance package yet—that looks really helpful!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Thu, 15 Sep 2022 15:55:55 -0000</pubDate></item><item><title>Re: Marginalia: A guide to figuring out what the heck marginal effects, marginal slopes, average marginal effects, marginal effects at the mean, and all these other marginal things are | Andrew Heiss</title><link>https://www.andrewheiss.com/blog/2022/05/20/marginalia/#comment-5983479162</link><description>&lt;p&gt;I would agree :). The AME and MEM are different estimands, which is why they're so different in the results. In real life you probably shouldn't calculate both and compare them to each other&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Thu, 15 Sep 2022 15:53:51 -0000</pubDate></item><item><title>Re: Quick and easy ways to deal with long labels in ggplot2 | Andrew Heiss</title><link>https://www.andrewheiss.com/blog/2022/06/23/long-labels-ggplot/#comment-5977951057</link><description>&lt;p&gt;It seems that `label_wrap()` and `str_wrap()` aren't compatible with `expression()`. However, you can fake it if you use ggtext since it can parse a subset of HTML tags like &amp;lt;sub&amp;gt; and &amp;lt;sup&amp;gt;!&lt;/p&gt;&lt;p&gt;Here's a reprex: &lt;a href="https://gist.github.com/andrewheiss/a01092503b01438bb0a2d82af3aec738" rel="nofollow noopener" target="_blank" title="https://gist.github.com/andrewheiss/a01092503b01438bb0a2d82af3aec738"&gt;https://gist.github.com/and...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="https://uploads.disquscdn.com/images/b716a06d6a2a5aa5a214c3ffd810a6a5e628eb847d289550fd3477386d85f356.png" rel="nofollow noopener" target="_blank" title="https://uploads.disquscdn.com/images/b716a06d6a2a5aa5a214c3ffd810a6a5e628eb847d289550fd3477386d85f356.png"&gt;https://uploads.disquscdn.c...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Mon, 12 Sep 2022 13:49:41 -0000</pubDate></item><item><title>Re: Convert logistic regression standard errors to odds ratios with R | Andrew Heiss</title><link>http://www.andrewheiss.com/blog/2016/04/25/convert-logistic-regression-standard-errors-to-odds-ratios-with-r/#comment-5153220468</link><description>&lt;p&gt;broom::tidy() exponentiates the coefficients and confidence intervals, but not the standard errors&lt;/p&gt;&lt;p&gt; &lt;a href="https://uploads.disquscdn.com/images/e83277ef0a54e302e06893336db466cb40e87cff22797b0915193a457304c647.png" rel="nofollow noopener" target="_blank" title="https://uploads.disquscdn.com/images/e83277ef0a54e302e06893336db466cb40e87cff22797b0915193a457304c647.png"&gt;https://uploads.disquscdn.c...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Sun, 15 Nov 2020 21:53:13 -0000</pubDate></item><item><title>Re: Meld regression output from multiple imputations with tidyverse | Andrew Heiss</title><link>http://www.andrewheiss.com/blog/2018/03/07/amelia-tidy-melding/#comment-5091013556</link><description>&lt;p&gt;Stargazer can't handle them, but there are more modern regression table packages that can handle any model that broom can handle, like modelsummary (&lt;a href="https://vincentarelbundock.github.io/modelsummary/)" rel="nofollow noopener" target="_blank" title="https://vincentarelbundock.github.io/modelsummary/)"&gt;https://vincentarelbundock....&lt;/a&gt; or huxtable (&lt;a href="https://hughjonesd.github.io/huxtable/)" rel="nofollow noopener" target="_blank" title="https://hughjonesd.github.io/huxtable/)"&gt;https://hughjonesd.github.i...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Wed, 30 Sep 2020 01:05:50 -0000</pubDate></item><item><title>Re: Ways to close backdoors in DAGs | Andrew Heiss</title><link>http://www.andrewheiss.com/blog/2020/02/25/closing-backdoors-dags/#comment-4812023288</link><description>&lt;p&gt;That I'm not entirely sure of. I've seen people talk about using any methods to get the most accurate propensity scores (even things like random forests and neural networks), though based on &lt;a href="https://twitter.com/jahenderson0/status/1231437723854155776" rel="nofollow noopener" target="_blank" title="https://twitter.com/jahenderson0/status/1231437723854155776"&gt;this tweet&lt;/a&gt;, those techniques can overfit propensity score models. So maybe include squared and cubed terms? And maybe not? :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Wed, 26 Feb 2020 23:14:46 -0000</pubDate></item><item><title>Re: Ways to close backdoors in DAGs | Andrew Heiss</title><link>http://www.andrewheiss.com/blog/2020/02/25/closing-backdoors-dags/#comment-4810261436</link><description>&lt;p&gt;In this case, just controlling for the backdoors in a regression model like that works just fine. That will only work, however, if all the relationships between the confounders and treatment and outcome are linear, which they are here because I made them that way. If there are any non-linearities or anything that's better modeled non-parametrically, using controls in regular OLS won't work (but IPW and matching should work)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Tue, 25 Feb 2020 22:20:36 -0000</pubDate></item><item><title>Re: Meld regression output from multiple imputations with tidyverse | Andrew Heiss</title><link>http://www.andrewheiss.com/blog/2018/03/07/amelia-tidy-melding/#comment-4605379168</link><description>&lt;p&gt;Hi! When summarizing and describing the data, you don't choose a single imputation, but you have to pool them together somehow. There's not really a standard for this—you might report the median, or the mean + standard deviation, or include density plots, etc.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Thu, 05 Sep 2019 11:11:41 -0000</pubDate></item><item><title>Re: Working with R, Cairo graphics, custom fonts, and ggplot | Andrew Heiss</title><link>http://www.andrewheiss.com/blog/2017/09/27/working-with-r-cairo-graphics-custom-fonts-and-ggplot/#comment-4523718600</link><description>&lt;p&gt;I'm not sure—it works for me on 3.6.0 in macOS… Can you post a reproducible example?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Mon, 01 Jul 2019 22:02:46 -0000</pubDate></item><item><title>Re: How to test any hypothesis with the `infer` package | Andrew Heiss</title><link>http://www.andrewheiss.com/blog/2018/12/05/test-any-hypothesis/#comment-4475596190</link><description>&lt;p&gt;No problem! Also, getting these codes is way easier than reading the CSV if you use the WDI package instead. It connects with the World Bank's API directly and returns pre-tidied data.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Fri, 24 May 2019 15:16:07 -0000</pubDate></item><item><title>Re: How to test any hypothesis with the `infer` package | Andrew Heiss</title><link>http://www.andrewheiss.com/blog/2018/12/05/test-any-hypothesis/#comment-4475589849</link><description>&lt;p&gt;Those are the columns in WWBICountry.csv. The columns in WWBIData.csv should look like this:&lt;/p&gt;&lt;p&gt;&lt;code&gt; [1] "Country Name"   "Country Code"   "Indicator Name" "Indicator Code" "2000"           "2001"          &lt;br&gt; [7] "2002"           "2003"           "2004"           "2005"           "2006"           "2007"          &lt;br&gt;[13] "2008"           "2009"           "2010"           "2011"           "2012"           "2013"          &lt;br&gt;[19] "2014"           "2015"           "2016"           "X22"&lt;/code&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Fri, 24 May 2019 15:10:48 -0000</pubDate></item><item><title>Re: How to test any hypothesis with the `infer` package | Andrew Heiss</title><link>http://www.andrewheiss.com/blog/2018/12/05/test-any-hypothesis/#comment-4475335512</link><description>&lt;p&gt;It still works. If you download the CSV file from &lt;a href="https://datacatalog.worldbank.org/dataset/worldwide-bureaucracy-indicators#tab2" rel="nofollow noopener" target="_blank" title="https://datacatalog.worldbank.org/dataset/worldwide-bureaucracy-indicators#tab2"&gt;https://datacatalog.worldba...&lt;/a&gt;, you'll get two files, one named "WWBICountry.csv" and one named "WWBIData.csv". WWBIData contains all the required data. That file itself doesn't have many of the columns in the code, but that's because the code that makes `wwbi_small` reshapes the data.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Fri, 24 May 2019 11:53:34 -0000</pubDate></item><item><title>Re: Create a cheap, disposable supercomputer with R, DigitalOcean, and future | Andrew Heiss</title><link>http://www.andrewheiss.com/blog/2018/07/30/disposable-supercomputer-future/#comment-4446918925</link><description>&lt;p&gt;Yeah, the data has to be present on each of the machines&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Thu, 02 May 2019 14:14:58 -0000</pubDate></item><item><title>Re: Create a cheap, disposable supercomputer with R, DigitalOcean, and future | Andrew Heiss</title><link>http://www.andrewheiss.com/blog/2018/07/30/disposable-supercomputer-future/#comment-4443876922</link><description>&lt;p&gt;You need to adjust the permissions for ~/.ssh: &lt;a href="https://www.howtogeek.com/168119/fixing-warning-unprotected-private-key-file-on-linux/" rel="nofollow noopener" target="_blank" title="https://www.howtogeek.com/168119/fixing-warning-unprotected-private-key-file-on-linux/"&gt;https://www.howtogeek.com/1...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Tue, 30 Apr 2019 11:24:08 -0000</pubDate></item><item><title>Re: Tidy text, parts of speech, and unique words in the Bible | Andrew Heiss</title><link>http://www.andrewheiss.com/blog/2018/12/26/tidytext-pos-john/#comment-4349669752</link><description>&lt;p&gt;The ESV is still under copyright and not in the public domain, but &lt;br&gt;there's an API (with a bunch of rate limits) here: &lt;a href="https://api.esv.org/" rel="nofollow noopener" target="_blank" title="https://api.esv.org/"&gt;https://api.esv.org/&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Fri, 22 Feb 2019 12:46:04 -0000</pubDate></item><item><title>Re: Tidy text, parts of speech, and unique words in the Qur'an | Andrew Heiss</title><link>http://www.andrewheiss.com/blog/2018/12/28/tidytext-pos-arabic/#comment-4261644428</link><description>&lt;p&gt;That's an issue with RStudio, I think. If you look at the data in a new tab, like with View(fatiha_terms), they should show up fine&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Sat, 29 Dec 2018 18:29:25 -0000</pubDate></item><item><title>Re: Tidy text, parts of speech, and unique words in the Qur'an | Andrew Heiss</title><link>http://www.andrewheiss.com/blog/2018/12/28/tidytext-pos-arabic/#comment-4261464629</link><description>&lt;p&gt;Huh. Try running `system.file("extdata", package = "cleanNLP")` to &lt;br&gt;see what the full path is on your computer, and then open that in &lt;br&gt;terminal or Finder/File Explorer. You should have a folder named &lt;br&gt;"stanford-corenlp-full-2018-10-05" and in there, there should be a large&lt;br&gt; 60+ MB file named "stanford-arabic-corenlp-2018-10-05-models.jar"&lt;/p&gt;&lt;p&gt;If it's not there, try running `cnlp_download_corenlp(type = "ar")` in R to make it download just the Arabic models&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Sat, 29 Dec 2018 15:46:17 -0000</pubDate></item><item><title>Re: The academic job search finally comes to an end | Andrew Heiss</title><link>http://www.andrewheiss.com/blog/2018/12/17/academic-job-market-visualized/#comment-4246154594</link><description>&lt;p&gt;Both are acceptable and "syllabi" is winning (see &lt;a href="https://books.google.com/ngrams/graph?content=syllabuses%2C+syllabi&amp;amp;year_start=1800&amp;amp;year_end=2000&amp;amp;corpus=15&amp;amp;smoothing=3&amp;amp;share=&amp;amp;direct_url=t1%3B%2Csyllabuses%3B%2Cc0%3B.t1%3B%2Csyllabi%3B%2Cc0" rel="nofollow noopener" target="_blank" title="https://books.google.com/ngrams/graph?content=syllabuses%2C+syllabi&amp;amp;year_start=1800&amp;amp;year_end=2000&amp;amp;corpus=15&amp;amp;smoothing=3&amp;amp;share=&amp;amp;direct_url=t1%3B%2Csyllabuses%3B%2Cc0%3B.t1%3B%2Csyllabi%3B%2Cc0"&gt;https://books.google.com/ng...&lt;/a&gt; ), but I'm sticking with my Anglicized pluralization for as long as possible :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Tue, 18 Dec 2018 01:48:46 -0000</pubDate></item><item><title>Re: The academic job search finally comes to an end | Andrew Heiss</title><link>http://www.andrewheiss.com/blog/2018/12/17/academic-job-market-visualized/#comment-4246150544</link><description>&lt;p&gt;But also syllabuses :) &lt;a href="http://languagelog.ldc.upenn.edu/nll/?p=2684" rel="nofollow noopener" target="_blank" title="http://languagelog.ldc.upenn.edu/nll/?p=2684"&gt;http://languagelog.ldc.upen...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Tue, 18 Dec 2018 01:42:06 -0000</pubDate></item><item><title>Re: Create supply and demand economics curves with ggplot2 | Andrew Heiss</title><link>http://www.andrewheiss.com/blog/2017/09/15/create-supply-and-demand-economics-curves-with-ggplot2/#comment-3658089502</link><description>&lt;p&gt;%&amp;gt;% comes from the magrittr package (which is part of the tidyverse) and it lets you pipe left-hand side values forward into expressions that appear on the right-hand side (see this chapter in the R for Data Science book: &lt;a href="http://r4ds.had.co.nz/pipes.html)" rel="nofollow noopener" target="_blank" title="http://r4ds.had.co.nz/pipes.html)"&gt;http://r4ds.had.co.nz/pipes...&lt;/a&gt;. It also gets loaded when you load dplyr&lt;/p&gt;&lt;p&gt;curve_intersect() is a custom function that's defined earlier in the blog post.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Mon, 11 Dec 2017 21:38:41 -0000</pubDate></item><item><title>Re: Create supply and demand economics curves with ggplot2 | Andrew Heiss</title><link>http://www.andrewheiss.com/blog/2017/09/15/create-supply-and-demand-economics-curves-with-ggplot2/#comment-3657902362</link><description>&lt;p&gt;I just ran `Hmisc::bezier(c(1, 8, 9), c(1, 5, 9))` with Hmsic 4.0-3 and it's most definitely there…&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Mon, 11 Dec 2017 18:53:51 -0000</pubDate></item><item><title>Re: Working with R, Cairo graphics, custom fonts, and ggplot | Andrew Heiss</title><link>http://www.andrewheiss.com/blog/2017/09/27/working-with-r-cairo-graphics-custom-fonts-and-ggplot/#comment-3629542510</link><description>&lt;p&gt;Yep! Those are great themes&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Thu, 23 Nov 2017 02:17:43 -0000</pubDate></item><item><title>Re: Exploring Minard’s 1812 plot with ggplot2 | Andrew Heiss</title><link>http://www.andrewheiss.com/blog/2017/08/10/exploring-minards-1812-plot-with-ggplot2/#comment-3484144890</link><description>&lt;p&gt;Ha, that's my Americanness showing. Fixed now. Thanks!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Thu, 24 Aug 2017 01:28:37 -0000</pubDate></item><item><title>Re: Convert logistic regression standard errors to odds ratios with R | Andrew Heiss</title><link>http://www.andrewheiss.com/blog/2016/04/25/convert-logistic-regression-standard-errors-to-odds-ratios-with-r/#comment-3242897351</link><description>&lt;p&gt;Sure, it's messed up and not entirely useful, but it's what Stata does and, correspondingly, it's what appears in lots of published work in economics and political science. When replicating articles that do report the transformed SEs, it's helpful to be able to transform them to ensure the replicated results match the published results.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrewheiss</dc:creator><pubDate>Thu, 06 Apr 2017 10:06:45 -0000</pubDate></item></channel></rss>