andrew_gelman_stats andrew_gelman_stats-2012 andrew_gelman_stats-2012-1472 knowledge-graph by maker-knowledge-mining

1472 andrew gelman stats-2012-08-28-Migrating from dot to underscore


meta infos for this blog

Source: html

Introduction: My C-oriented Stan collaborators have convinced me to use underscore (_) rather than dot (.) as much as possible in expressions in R. For example, I can name a variable n_years rather than n.years. This is fine. But I’m getting annoyed because I need to press the shift key every time I type the underscore. What do people do about this? I know that it’s easy enough to reassign keys (I could, for example, assign underscore to backslash, which I never use). I’m just wondering what C programmers actually do. Do they reassign the key or do they just get used to pressing Shift? P.S. In comments, Ben Hyde points to Google’s R style guide, which recommends that variable names use dots, not underscore or camel case, for variable names (for example, “avg.clicks” rather than “avg_Clicks” or “avgClicks”). I think they’re recommending this to be consistent with R coding conventions . I am switching to underscores in R variable names to be consistent with C. Otherwise we were run


Summary: the most important sentenses genereted by tfidf model

sentIndex sentText sentNum sentScore

1 My C-oriented Stan collaborators have convinced me to use underscore (_) rather than dot (. [sent-1, score-0.843]

2 For example, I can name a variable n_years rather than n. [sent-3, score-0.49]

3 But I’m getting annoyed because I need to press the shift key every time I type the underscore. [sent-6, score-0.44]

4 I know that it’s easy enough to reassign keys (I could, for example, assign underscore to backslash, which I never use). [sent-8, score-0.88]

5 I’m just wondering what C programmers actually do. [sent-9, score-0.167]

6 Do they reassign the key or do they just get used to pressing Shift? [sent-10, score-0.482]

7 In comments, Ben Hyde points to Google’s R style guide, which recommends that variable names use dots, not underscore or camel case, for variable names (for example, “avg. [sent-13, score-1.815]

8 I think they’re recommending this to be consistent with R coding conventions . [sent-15, score-0.461]

9 I am switching to underscores in R variable names to be consistent with C. [sent-16, score-1.162]

10 Otherwise we were running into difficulties because Stan, following C, does not allow dots in variable names. [sent-17, score-0.659]

11 I don’t want to have a variable that’s called sd. [sent-18, score-0.362]

12 We don’t want to be changing Stan’s rules (too much of a mess given that Stan is written in C++) so I have to change my R conventions. [sent-21, score-0.324]

13 Then once I switch to underscores for variables that go into Stan models, I’m inclined to be consistent and use underscores throughout. [sent-22, score-1.197]


similar blogs computed by tfidf model

tfidf for this blog:

wordName wordTfidf (topN-words)

[('underscore', 0.418), ('underscores', 0.38), ('variable', 0.31), ('reassign', 0.278), ('stan', 0.276), ('names', 0.197), ('consistent', 0.173), ('dots', 0.168), ('shift', 0.148), ('camel', 0.127), ('hyde', 0.114), ('conventions', 0.11), ('pressing', 0.11), ('programmers', 0.107), ('keys', 0.104), ('switching', 0.102), ('name', 0.102), ('use', 0.098), ('recommending', 0.096), ('expressions', 0.096), ('recommends', 0.095), ('key', 0.094), ('dot', 0.093), ('mess', 0.086), ('inclined', 0.086), ('coding', 0.082), ('assign', 0.08), ('switch', 0.08), ('collaborators', 0.079), ('ben', 0.079), ('guide', 0.079), ('annoyed', 0.079), ('rather', 0.078), ('convinced', 0.077), ('throughout', 0.076), ('changing', 0.067), ('difficulties', 0.066), ('press', 0.065), ('example', 0.063), ('style', 0.063), ('easier', 0.062), ('rules', 0.061), ('wondering', 0.06), ('otherwise', 0.059), ('allow', 0.059), ('much', 0.058), ('google', 0.057), ('running', 0.056), ('type', 0.054), ('want', 0.052)]

similar blogs list:

simIndex simValue blogId blogTitle

same-blog 1 0.99999988 1472 andrew gelman stats-2012-08-28-Migrating from dot to underscore

Introduction: My C-oriented Stan collaborators have convinced me to use underscore (_) rather than dot (.) as much as possible in expressions in R. For example, I can name a variable n_years rather than n.years. This is fine. But I’m getting annoyed because I need to press the shift key every time I type the underscore. What do people do about this? I know that it’s easy enough to reassign keys (I could, for example, assign underscore to backslash, which I never use). I’m just wondering what C programmers actually do. Do they reassign the key or do they just get used to pressing Shift? P.S. In comments, Ben Hyde points to Google’s R style guide, which recommends that variable names use dots, not underscore or camel case, for variable names (for example, “avg.clicks” rather than “avg_Clicks” or “avgClicks”). I think they’re recommending this to be consistent with R coding conventions . I am switching to underscores in R variable names to be consistent with C. Otherwise we were run

2 0.18462558 1475 andrew gelman stats-2012-08-30-A Stan is Born

Introduction: Stan 1.0.0 and RStan 1.0.0 It’s official. The Stan Development Team is happy to announce the first stable versions of Stan and RStan. What is (R)Stan? Stan is an open-source package for obtaining Bayesian inference using the No-U-Turn sampler, a variant of Hamiltonian Monte Carlo. It’s sort of like BUGS, but with a different language for expressing models and a different sampler for sampling from their posteriors. RStan is the R interface to Stan. Stan Home Page Stan’s home page is: http://mc-stan.org/ It links everything you need to get started running Stan from the command line, from R, or from C++, including full step-by-step install instructions, a detailed user’s guide and reference manual for the modeling language, and tested ports of most of the BUGS examples. Peruse the Manual If you’d like to learn more, the Stan User’s Guide and Reference Manual is the place to start.

3 0.16247204 2291 andrew gelman stats-2014-04-14-Transitioning to Stan

Introduction: Kevin Cartier writes: I’ve been happily using R for a number of years now and recently came across Stan. Looks big and powerful, so I’d like to pick an appropriate project and try it out. I wondered if you could point me to a link or document that goes into the motivation for this tool (aside from the Stan user doc)? What I’d like to understand is, at what point might you look at an emergent R project and advise, “You know, that thing you’re trying to do would be a whole lot easier/simpler/more straightforward to implement with Stan.” (or words to that effect). My reply: For my collaborators in political science, Stan has been most useful for models where the data set is not huge (e.g., we might have 10,000 data points or 50,000 data points but not 10 million) but where the model is somewhat complex (for example, a model with latent time series structure). The point is that the model has enough parameters and uncertainty that you’ll want to do full Bayes (rather than some sort

4 0.15246056 1748 andrew gelman stats-2013-03-04-PyStan!

Introduction: Stan is written in C++ and can be run from the command line and from R. We’d like for Python users to be able to run Stan as well. If anyone is interested in doing this, please let us know and we’d be happy to work with you on it. Stan, like Python, is completely free and open-source. P.S. Because Stan is open-source, it of course would also be possible for people to translate Stan into Python, or to take whatever features they like from Stan and incorporate them into a Python package. That’s fine too. But we think it would make sense in addition for users to be able to run Stan directly from Python, in the same way that it can be run from R.

5 0.15066609 1919 andrew gelman stats-2013-06-29-R sucks

Introduction: I was trying to make some new graphs using 5-year-old R code and I got all these problems because I was reading in files with variable names such as “co.fipsid” and now R is automatically changing them to “co_fipsid”. Or maybe the names had underbars all along, and the old R had changed them into dots. Whatever. I understand that backward compatibility can be hard to maintain, but this is just annoying.

6 0.13399315 1580 andrew gelman stats-2012-11-16-Stantastic!

7 0.13358948 2211 andrew gelman stats-2014-02-14-The popularity of certain baby names is falling off the clifffffffffffff

8 0.12581399 2161 andrew gelman stats-2014-01-07-My recent debugging experience

9 0.11725291 2150 andrew gelman stats-2013-12-27-(R-Py-Cmd)Stan 2.1.0

10 0.11051593 1807 andrew gelman stats-2013-04-17-Data problems, coding errors…what can be done?

11 0.11032668 2124 andrew gelman stats-2013-12-05-Stan (quietly) passes 512 people on the users list

12 0.11024644 1627 andrew gelman stats-2012-12-17-Stan and RStan 1.1.0

13 0.10859048 1950 andrew gelman stats-2013-07-22-My talks that were scheduled for Tues at the Data Skeptics meetup and Wed at the Open Statistical Programming meetup

14 0.10669798 2212 andrew gelman stats-2014-02-15-Mary, Mary, why ya buggin

15 0.10404509 1855 andrew gelman stats-2013-05-13-Stan!

16 0.10187151 1218 andrew gelman stats-2012-03-18-Check your missing-data imputations using cross-validation

17 0.099577531 2096 andrew gelman stats-2013-11-10-Schiminovich is on The Simpsons

18 0.099077135 2208 andrew gelman stats-2014-02-12-How to think about “identifiability” in Bayesian inference?

19 0.0972424 1900 andrew gelman stats-2013-06-15-Exploratory multilevel analysis when group-level variables are of importance

20 0.092181712 1814 andrew gelman stats-2013-04-20-A mess with which I am comfortable


similar blogs computed by lsi model

lsi for this blog:

topicId topicWeight

[(0, 0.106), (1, 0.027), (2, -0.007), (3, 0.038), (4, 0.095), (5, 0.029), (6, 0.018), (7, -0.153), (8, -0.024), (9, -0.069), (10, -0.097), (11, 0.013), (12, -0.052), (13, -0.031), (14, 0.063), (15, 0.028), (16, -0.011), (17, 0.025), (18, -0.013), (19, 0.007), (20, -0.042), (21, 0.016), (22, -0.03), (23, -0.005), (24, -0.006), (25, -0.028), (26, 0.038), (27, -0.02), (28, -0.085), (29, -0.015), (30, 0.051), (31, 0.037), (32, -0.022), (33, 0.035), (34, -0.046), (35, 0.031), (36, 0.038), (37, 0.042), (38, -0.054), (39, -0.014), (40, -0.026), (41, -0.003), (42, 0.02), (43, -0.013), (44, -0.016), (45, 0.039), (46, 0.039), (47, 0.048), (48, 0.012), (49, 0.08)]

similar blogs list:

simIndex simValue blogId blogTitle

same-blog 1 0.97530031 1472 andrew gelman stats-2012-08-28-Migrating from dot to underscore

Introduction: My C-oriented Stan collaborators have convinced me to use underscore (_) rather than dot (.) as much as possible in expressions in R. For example, I can name a variable n_years rather than n.years. This is fine. But I’m getting annoyed because I need to press the shift key every time I type the underscore. What do people do about this? I know that it’s easy enough to reassign keys (I could, for example, assign underscore to backslash, which I never use). I’m just wondering what C programmers actually do. Do they reassign the key or do they just get used to pressing Shift? P.S. In comments, Ben Hyde points to Google’s R style guide, which recommends that variable names use dots, not underscore or camel case, for variable names (for example, “avg.clicks” rather than “avg_Clicks” or “avgClicks”). I think they’re recommending this to be consistent with R coding conventions . I am switching to underscores in R variable names to be consistent with C. Otherwise we were run

2 0.84553504 1748 andrew gelman stats-2013-03-04-PyStan!

Introduction: Stan is written in C++ and can be run from the command line and from R. We’d like for Python users to be able to run Stan as well. If anyone is interested in doing this, please let us know and we’d be happy to work with you on it. Stan, like Python, is completely free and open-source. P.S. Because Stan is open-source, it of course would also be possible for people to translate Stan into Python, or to take whatever features they like from Stan and incorporate them into a Python package. That’s fine too. But we think it would make sense in addition for users to be able to run Stan directly from Python, in the same way that it can be run from R.

3 0.83326262 2096 andrew gelman stats-2013-11-10-Schiminovich is on The Simpsons

Introduction: OK, fine . Maybe they could work Stan on to the show next? I thought I could retire once I’d successfully inserted the phrase “multilevel regression and poststratification” into the NYT, but now I want more more more. Maybe a cage match between Stan and Mister P on the Itchy and Scratchy show?

4 0.81660575 712 andrew gelman stats-2011-05-14-The joys of working in the public domain

Introduction: Stan will make a total lifetime profit of $0, so we can’t be sued !

5 0.81601727 2124 andrew gelman stats-2013-12-05-Stan (quietly) passes 512 people on the users list

Introduction: Stan is alive and well. We’re up to 523 people on the users list . [We're sure there are many more than 523 actual users, since it's easy to download and use Stan directly without joining the list.] We’re working on a v2.1.0 release now and we hope to release it in within the next couple of weeks.

6 0.79914153 2161 andrew gelman stats-2014-01-07-My recent debugging experience

7 0.79490274 1475 andrew gelman stats-2012-08-30-A Stan is Born

8 0.79358804 2150 andrew gelman stats-2013-12-27-(R-Py-Cmd)Stan 2.1.0

9 0.79117495 1580 andrew gelman stats-2012-11-16-Stantastic!

10 0.7901749 2209 andrew gelman stats-2014-02-13-CmdStan, RStan, PyStan v2.2.0

11 0.7672984 1627 andrew gelman stats-2012-12-17-Stan and RStan 1.1.0

12 0.75641841 1855 andrew gelman stats-2013-05-13-Stan!

13 0.73320651 2291 andrew gelman stats-2014-04-14-Transitioning to Stan

14 0.72514719 2325 andrew gelman stats-2014-05-07-Stan users meetup next week

15 0.69595224 1576 andrew gelman stats-2012-11-13-Stan at NIPS 2012 Workshop on Probabilistic Programming

16 0.68454486 2318 andrew gelman stats-2014-05-04-Stan (& JAGS) Tutorial on Linear Mixed Models

17 0.67963642 2020 andrew gelman stats-2013-09-12-Samplers for Big Science: emcee and BAT

18 0.67051256 1716 andrew gelman stats-2013-02-09-iPython Notebook

19 0.66992289 2003 andrew gelman stats-2013-08-30-Stan Project: Continuous Relaxations for Discrete MRFs

20 0.65735793 2242 andrew gelman stats-2014-03-10-Stan Model of the Week: PK Calculation of IV and Oral Dosing


similar blogs computed by lda model

lda for this blog:

topicId topicWeight

[(4, 0.028), (9, 0.012), (10, 0.014), (16, 0.026), (17, 0.014), (21, 0.02), (24, 0.139), (27, 0.271), (48, 0.012), (57, 0.015), (77, 0.023), (89, 0.011), (90, 0.022), (95, 0.039), (99, 0.241)]

similar blogs list:

simIndex simValue blogId blogTitle

1 0.95011234 802 andrew gelman stats-2011-07-13-Super Sam Fuld Needs Your Help (with Foul Ball stats)

Introduction: I was pleasantly surprised to have my recreational reading about baseball in the New Yorker interrupted by a digression on statistics. Sam Fuld of the Tampa Bay Rays, was the subjet of a Ben McGrath profile in the 4 July 2011 issue of the New Yorker , in an article titled Super Sam . After quoting a minor-league trainer who described Fuld as “a bit of a geek” (who isn’t these days?), McGrath gets into that lovely New Yorker detail: One could have pointed out the more persuasive and telling examples, such as the fact that in 2005, after his first pro season, with the Class-A Peoria Chiefs, Fuld applied for a fall internship with Stats, Inc., the research firm that supplies broadcasters with much of the data anad analysis that you hear in sports telecasts. After a description of what they had him doing, reviewing footage of games and cataloguing, he said “I thought, They have a stat for everything, but they don’t have any stats regarding foul balls.” Fuld’s

2 0.90473056 347 andrew gelman stats-2010-10-17-Getting arm and lme4 running on the Mac

Introduction: Our “arm” package in R requires Doug Bates’s “lme4″ which fits multilevel models. lme4 is currently having some problems on the Mac. But installation on the Mac can be done; it just takes a bit of work. I have two sets of instructions below. From Yu-Sung: If you have MAC OS DVD, you should install developer X code packages from it. Otherwise, install them from here . After this, do the following in R: install.packages(“lme4″, type = “source”) Then you will have lme4 in R and you can install arm without a problem. And, from David Ozonoff: I installed the lme4 package via the Package Installer but this didn’t work, of course. I then installed, via this link , gfortran which seemed to put the libraries in the right place (I had earlier installed via Fink the gcc42 compiler, so I’m not sure if this is required or not). I then ran, in R, this: install.packages(c(“Matrix”,”lme4″), repos=”http://R-Forge.R-project.org”) This does not appear to work since it wi

3 0.90101761 930 andrew gelman stats-2011-09-28-Wiley Wegman chutzpah update: Now you too can buy a selection of garbled Wikipedia articles, for a mere $1400-$2800 per year!

Introduction: Someone passed on to a message from his university library announcing that the journal “Wiley Interdisciplinary Reviews: Computational Statistics” is no longer free. Librarians have to decide what to do, so I thought I’d offer the following consumer guide: Wiley Computational Statistics journal Wikipedia Frequency 6 issues per year Continuously updated Includes articles from Wikipedia? Yes Yes Cites the Wikipedia sources it uses? No Yes Edited by recipient of ASA Founders Award? Yes No Articles are subject to rigorous review? No Yes Errors, when discovered, get fixed? No Yes Number of vertices in n-dimensional hypercube? 2n 2 n Easy access to Brady Bunch trivia? No Yes Cost (North America) $1400-$2800 $0 Cost (UK) £986-£1972 £0 Cost (Europe) €1213-€2426 €0 The choice seems pretty clear to me! It’s funny for the Wiley journal to start charging now

same-blog 4 0.89545047 1472 andrew gelman stats-2012-08-28-Migrating from dot to underscore

Introduction: My C-oriented Stan collaborators have convinced me to use underscore (_) rather than dot (.) as much as possible in expressions in R. For example, I can name a variable n_years rather than n.years. This is fine. But I’m getting annoyed because I need to press the shift key every time I type the underscore. What do people do about this? I know that it’s easy enough to reassign keys (I could, for example, assign underscore to backslash, which I never use). I’m just wondering what C programmers actually do. Do they reassign the key or do they just get used to pressing Shift? P.S. In comments, Ben Hyde points to Google’s R style guide, which recommends that variable names use dots, not underscore or camel case, for variable names (for example, “avg.clicks” rather than “avg_Clicks” or “avgClicks”). I think they’re recommending this to be consistent with R coding conventions . I am switching to underscores in R variable names to be consistent with C. Otherwise we were run

5 0.8928448 1490 andrew gelman stats-2012-09-09-I’m still wondering . . .

Introduction: Why can’t I buy train and plane tickets through Amazon? That would be so much more convenient than the current system where I have to keep entering information into the damn forms over and over again.

6 0.88617671 134 andrew gelman stats-2010-07-08-“What do you think about curved lines connecting discrete data-points?”

7 0.87096131 343 andrew gelman stats-2010-10-15-?

8 0.86862177 465 andrew gelman stats-2010-12-13-$3M health care prediction challenge

9 0.85902005 173 andrew gelman stats-2010-07-31-Editing and clutch hitting

10 0.85722631 708 andrew gelman stats-2011-05-12-Improvement of 5 MPG: how many more auto deaths?

11 0.84735906 1727 andrew gelman stats-2013-02-19-Beef with data

12 0.8279233 1869 andrew gelman stats-2013-05-24-In which I side with Neyman over Fisher

13 0.8266654 1238 andrew gelman stats-2012-03-31-Dispute about ethics of data sharing

14 0.82228553 1255 andrew gelman stats-2012-04-10-Amtrak sucks

15 0.8193242 1982 andrew gelman stats-2013-08-15-Blaming scientific fraud on the Kuhnians

16 0.81842792 804 andrew gelman stats-2011-07-15-Static sensitivity analysis

17 0.81788796 652 andrew gelman stats-2011-04-07-Minor-league Stats Predict Major-league Performance, Sarah Palin, and Some Differences Between Baseball and Politics

18 0.80957675 341 andrew gelman stats-2010-10-14-Confusion about continuous probability densities

19 0.80841267 2132 andrew gelman stats-2013-12-13-And now, here’s something that would make Ed Tufte spin in his . . . ummm, Tufte’s still around, actually, so let’s just say I don’t think he’d like it!

20 0.8043474 2079 andrew gelman stats-2013-10-27-Uncompressing the concept of compressed sensing