Posts filed under ‘Uncategorized’

Strange Things Are Afoot at the IMDb

| Gabriel |

I was helping a friend check something on IMDb for a paper and so we went to the URL that gives you the raw data. We found it’s in a completely different format than it was last time I checked, about a year ago.

The old data will be available until November 2017. I suggest you grab a complete copy while you still can.

Good news: The data is in a much simpler format, being six wide tables that are tab-separated row/column text files. You’ll no longer need my Perl scripts to convert them from a few dozen files that are a weird mish mash of field-tagged format and the weirdest tab-delimited text you’ve ever seen. Good riddance.

Bad news: It’s hard to use. S3 is designed for developers not end users. You could download the old version with Chrome or “curl” from the command line. The new version requires you to create an S3 account and as best I can tell, there’s no way to just use the S3 web interface to get it. There is sample Java code, but it requires supplying your account credentials which gives me cold sweat flashbacks to when Twitter changed its API and my R scrape broke. Anyway, bottom line being you’ll probably need IT to help you with this.

Really bad news: A lot of the files are gone. There’s no country by country release dates, no box offices, no plot keywords, there are only up to three genres, no distributor or production company, etc. These are all things I’ve used in publications.


September 8, 2017 at 2:29 pm 3 comments

The more things change

| Gabriel |

I just listened to a podcast conversation [transcript / audio] between Tyler Cowen and Ben Sasse and very much enjoyed it but was bothered by one of the senator’s laugh lines, “Turned out sex was really similar in most centuries.”* Now in a sense this is obviously true since any culture in which sex lost a certain aspect would only last one generation, and indeed this has happened. But there is still a lot of variation within the scope condition that in pretty much all times and places, sex is procreative at least some of the time. What kinds of sex one has varies enormously over time, as does with what kinds of and how many people. We can see this over big periods of history and within living memory in our own culture. My discussion will be necessarily detailed, but not prurient.

Dover’s Greek Homosexuality uses detailed interpretation of comedies, legal speeches, pornographic pottery, and similar sources to provide a thorough picture of sexuality in 4th and 5th c BCE Greece, especially among Athenian upper class men, but not limited just to the idiosyncratic and often idealized views of philosophers. There were two big differences with our culture, the most obvious being that with whom you had sex varied over the life course and the less obvious but equally important one being that what role you played was equally important as with whom you played it. An aristocratic Athenian male would typically be an eromenos (“beloved” or passive homosexual) in his late teens and when he reached full maturity would be an erastes (“lover” or active homosexual) but also get married to a woman. As long as you stuck to this life course trajectory, no money changed hands, and the eromenos had love but not lust for his erastes, the relationship was honorable. However for someone to remain an eromenos into full maturity was scandalous and bearded men who continued to accept passive sexual roles were stigmatized. Interestingly, what exactly is the action that occurs between active and passive varies enormously based on source, with philosophers downplaying sex entirely, pornographic pottery suggesting intercrural sex, and Aristophanes joking about anal intercourse (e.g., the best food for a dung beetle).

One thing the sources seem to agree on is that fellatio generally did not occur among Greek men. Dover argues that the avoidance of fellatio, avoidance of prostitution, and age separation of partners all served the purpose of avoiding hubris (assault that degrades status) otherwise implied by one male citizen penetrating another. Generally, our culture’s ubiquity of fellatio, and especially our common assumption that it is less intimate than vaginal intercourse, is exceptional across cultures. This is not only an issue of Greece, fellatio was exceptionally rare in 18th c elite French prostitution (although anal sex was common) and in early 20th c New York city. Interestingly, Dover notes that the women of Lesbos were legendary in Greek culture for heterosexual fellatio. While our culture derives our word for gay women from that island, largely through it being the home of Sappho, the cultural meaning in antiquity was of fellatrix, though the two meanings made sense in the Greek mind as relating to women who were especially open to sex of many varieties. This sounds bizarre to us, but as I’ll describe in a bit, this reflects emerging practice in our own culture.

For changes in recent decades, we do not need to rely on measuring the angles of penetration depicted on a kylix or on epithets in old comedy but can go by systematic survey data.** The main finding of Laumann et al’s 1994 Sex in America study was that sex was much more focused on monogamy, marriage, and vaginal intercourse than anyone expected based on Kinsey (who relied on convenience sampling) or popular culture. However things have changed a lot in the last two decades and in ways much more profound than that my undergrads don’t like rock music. The National Survey of Family Growth 2002-2013 replicates most of the research questions of Laumann et al and found that sex had gotten much more complicated since the early 1990s.  One major finding is a substantial rise in same sex intercourse. Women born from 1966-1974 are half as likely to have had same sex intercourse as women born from 1985-1995. In contrast to ancient Athens, this rise in same sex intercourse is limited to women (and the base rate is much higher), but as in ancient Greece, it is mostly an issue of youthful experimentation that is complementary to heterosexual practice and on the margin women self-identify as straight or bi, not lesbian. Chandra et al’s analysis of the same data showed a corollary that echos ancient stereotypes of Lesbians, which is that female experience with same sex partners is positively correlated with lifetime number of male partners. In addition, Chandra et al found that heterosexual anal intercourse is rising substantially, with about 30% of women aged 18-44 in 2002 having experienced it, or almost double what Laumann et al found twenty years earlier. This likely reflects influence from pornography, as does the almost universal (~85%) adoption of pubic grooming among women under thirty. However, again, this reflects ancient trends as ancient Greek women would singe off pubic hair and indeed the punishment for a male adulterer was to be symbolically feminized through pubic depilation and penetration with a radish.

* Sasse elaborated that he meant that in all times and places sex serves a mix of recreation, procreation, and pair-bonding and I think he’s right about that.

** I am not relying on pornography production or usage data as I strongly suspect that pornography follows a zero-inflated over-dispersed count distribution and thus consumption data, especially that showing that pornography is increasingly bizarre, is mostly informative about a relatively small minority of intensive users.

July 3, 2017 at 10:38 am 11 comments

Medicaid and mortality

| Gabriel |

This morning Spotted Toad picked up on the point in Quinones that a lot of pill mills were funded through Medicaid fraud and so he used Medicaid expansion under Obamacare to see if this led to greater drug overdoses in Medicaid expansion states. In fact he found that in the time since the Medicaid expansion, states that participated in the expansion had faster growth in overdose deaths than states that refused Medicaid expansion. That’s interesting, but I never want to base a trend on just two time points. (FWIW, Toad was analyzing the data as the CDC presents it — the analysis below requires a lot more queries). So I queried the CDC data in more granular detail to check if the trend started with Medicaid expansion. (saved query link, just iterate over year to get annual state-level OD deaths).

As it turns out, I was able to replicate Toad’s finding that Medicaid expansion states (blue) have higher rates and faster growth in fatal drug overdoses than Medicaid holdout states (red), but the two groups of states diverged starting in 2010, well before states began implementing Obamacare’s Medicaid expansion. So there may be a real difference between Medicaid expansion states (which are generally Democratic) and Medicaid holdout states (which are Republican), and the difference may even be some aspect of health policy, but it wasn’t Obamacare Medicaid expansion as the divergence starts too early. (It’s worth noting that Toad updated his own post with my graph as soon as I sent it to him).


Here is the data in Stata format (which you can reconstruct yourself from a series of CDC queries).

Here is the code

cd "~/Documents/codeandculture/cdcdrugmortality"

gen state=""
gen year=.
save drugs19992015.dta, replace

forvalues i=1999/2015 {
 disp "`i'"
 insheet using drugs`i'.txt, clear
 append using drugs19992015.dta, force
 recode year .=`i'
 save drugs19992015, replace
drop if state==""


insheet using medicaidholdouts.txt, clear
ren v1 state
save medicaidholdouts.dta, replace

use medicaidholdouts, clear
merge 1:m state using drugs19992015
ren _merge medicaidexpansion 
recode medicaidexpansion 2=1 3=0

list state medicaidexpansion if (state=="Texas" | state=="California") & year==2010

save drugs19992015, replace

collapse (sum)deaths population, by (year medicaidexpansion)
gen cruderate= deaths/population
twoway (line cruderate year if medicaidexpansion==1) (line cruderate year if medicaidexpansion==0) , legend(order(1 "Medicaid expansion" 2 "Holdouts")) ytitle(Weighted Crude Rate of Fatal Drug Overdoses)
graph export medicaidod.png, replace

*have a nice day

And here’s my list of Medicaid holdouts:

North Carolina
South Carolina
South Dakota


March 21, 2017 at 9:16 pm 3 comments

They Meant Us No Harm, But Only Gave Us the Lotus

| Gabriel |

After hearing Sam Quinones on EconTalk, I finally stopped procrastinating and read Dreamland. It only took a few days over which every other activity was a distraction from finishing the book. Dreamland provides a unified story of the opiate epidemic starting in the late 1990s with both the overall social trend and close-ups on the lives of dealers, addicts, doctors, cops, epidemiologists, and mourners. I’ve watched every episode of Justified and read Case and Deaton PNAS 2015, so I was not surprised by the broad argument of the book that a shift in medicine towards prescribing opiates created ubiquitous chemical dependence that was eventually met by black tar heroin, all of which disproportionately affected rust belt white people. What made the book amazing to me even knowing the broad contours of the social facts it describes was how every detail of the book illustrated and illuminated another aspect of sociology. As I remarked on Twitter, my discipline could very well treat Dreamland the same way political scientists treat History of the Peloponnesian War.

In no particular order, here are a few of the themes I noticed.

The dealers who come up from Xalisco, Nayarit to live for a few months in spartan conditions working long hours driving around with balloons of dope in their mouths are motivated by relative deprivation. As more and more dealer-migrants return to Xalisco flush with cash this creates a new standard of living in the village and transforms being an impoverished sugar cane farmer from just how life goes to a status that can be rejected. But relative deprivation is too weak to explain Xalisco life, which is better characterized as competitive feasting straight out of Mauss’s The Gift. Xalisco-style potlatch can occur whenever a migrant returns with suitcases full of Levis 501s to disburse to a receiving line of supplicants, but is especially centered on the corn festival, where migrants would compete by sponsoring banda performances (104). Interestingly, while dealers often planned to save enough wages to capitalize a small business, they tended to dissipate their wealth in gifts to family and “the rest on beer, strip clubs, and cocaine, and walked the streets of Xalisco for a week or two the object of other men’s envy” (261). This envy is something Quinones emphasizes repeatedly and the way it is formed by public feasting and is sublimated into a need to reciprocate so as to restore honor, which in turn creates the labor supply for black tar heroin retailing as men seek another bundle of cash through which to engage in such honorable public profligacy.

Social capital also plays a strong role in explaining how Xalisco drug crews operated, which was distinct from most drug dealers. Notwithstanding a handful of murders in the book, Xalisco dealers generally eschewed violence and never carry guns. Competing heroin crews had an approach of friendly competition rather than violent turf wars over territory. Quinones attributes this partly to their “pizza delivery” business model as compared to traditional corner slinging, but mostly to the thick interconnected ties based in a small rancho back home where everybody knows everybody. Another distinctive aspect of the Xalisco boys business model is that dealers earn a salary, whereas typically drugs are sold on commission. This would normally present a principle-agent problem, but it was not an issue for Xalisco dealers. Crew bosses did engage in monitoring  through calling junkies to confirm that their dealers were prompt, polite, and the heroin was of high quality, but these monitoring costs were feasible because of the high level of trust. Crew bosses basically trusted their dealers because they weren’t junkies (Xalisco boys consider heroin disgusting) and they had thick communal ties from the rancho. This is the positive aspect of social capital, but there is also a negative sense of social capital in that men were pushed into drug dealing and returning to drug dealing by the insatiable demands to support relatives. That’s all supply side, but social capital also characterizes Quinones’s understanding of the demand side, though in a sense closer to Putnam than Portes, in blaming the rise of opiates on the collapse of community. In this aspect of the story Quinones is a staunch communitarian moralist, which didn’t bother me as I’m a communitarian moralist too, but YMMV and blaming opiates on the collapse of community was the only argument in the book that was more tell than show.

On the prescription opiates side, Quinones tells the story of how medicine lost its traditional reluctance to prescribe opiates in the pain revolution and particularly the key role played by Porter and Jick NEJM (1980). The article itself is a one paragraph letter noting that in-patients treated with opiates rarely became addicted. The role of this brief letter in the pain revolution is instructive for scientific epistemology. In terms of scientific epistemology it provides a valuable cautionary tale for the problem of generalizing beyond the scope of the data. The finding showed that in-patients receiving very conservative doses of opiates rarely became addicted but this was interpreted as it being completely safe to provide out-patients with liberal supplies of opiates. In Quinones’s telling, the article is something of a Sleeping Beauty citation, taking off after it was cited in a 1986 Pain article by Foley and Portenoy. However a Google Scholar search shows that the article began getting cited almost immediately (the earliest citation is from 1982 in a nursing journal). Nonetheless the story of how a brief publication summarizing a single database query was interpreted well beyond its original scope conditions to justify risky changes to medical practice can provide grist for the mill of historians and sociologists of science. A key part of the story as to why people cited this tiny publication is because they wanted to believe it as it created a permission structure for prescribing effective but dangerous drugs and pharmaceutical detailing exploited this by promoting Porter and Jick, or even just the black-boxed factoid of “1% addiction rate” to physicians.

A few other themes I noticed:

  • pharmaceutical detailing in opiates, as in all drugs, follows my model of obfuscated transactionalism and Quinones has a lot of material on the history of detailing
  • the submerged state gives Medicaid rather than cash transfers and a lot of diverted opiates came from pill mills paid for through Medicaid fraud
  • Xalisco boys engage in statistical discrimination by only selling to white customers who they see as less likely to rob them than black customers
  • chain migration characterizes some aspects of Xalisco boy migration, but they also are entrepreneurial in relying on junkies as scouts to explore new markets, including ones with no history of Nayarit migrants
  • doctors prescribed opiates in part to get patients out of their offices quickly and prescribed 30 day packs of pills rather than 3 day packs of pills to avoid return visits. Proper pain management is extremely labor intensive, but hard to get insurance reimbursement. This follows logically from Baumol’s disease in that as high-skilled medical labor grows more expensive, insurance companies will substitute capital (drugs).
  • reactivity is everywhere. Pain is part of doctor and hospital ratings, but iatrogenic addiction is not so doctors prescribe dope. Sentencing is based on large quantities of dope and carrying a gun so Xalisco boys carry only small quantities of dope and go unarmed.


And oh yeah, there’s also some stuff in the book about how this is an enormous social and public health epidemic, killing tens of thousands of Americans a year and stealing the souls of many more — debasing them into the kind of people who steal their children’s Christmas presents to trade for pills. But I’d rather focus on how it provides material for developing theory because I prefer to be fascinated than livid and that attitude is how I made it all the way through the book only breaking down in tears once.

January 27, 2017 at 9:55 am 1 comment

Obfuscated Transactionalism at Cato Unbound

| Gabriel |

From my lead essay at Cato Unbound:

And so we modern people take for granted that we both produce and consume through markets. The idea that we might acquire groceries because the butcher, the baker, and the brewer owe us favors rather than because we hand them cash or a Visa card seems primitive. Nonetheless, there are circumstances where we modern westerners consider prestations more appropriate than purchases. This preference extends well beyond obvious matters of intimacy like sex and Christmas presents and even reaches into business interactions.

Responses from Mike Munger, Alan Fiske, and Alex Tabarrok to follow.

June 6, 2016 at 9:05 am

Ruby Slippers

| Gabriel |


Rod Dreher at The American Conservative has a post on people invoking the concept of “social construction” with his lead example being a speech and debate team that always changes the subject to a critical race theory rant about the conventions of debate itself, even if the pre-specified debate topic is about national service or green energy or whatever. The judge then awards the match to this non sequitur, invoking “social constructionism” to explain himself.

I can get angry about this on a whole other level than Dreher does, precisely because I think social construction is a valuable concept. And I really do take the concept seriously. My PhD training is as a neo-institutionalist (ie, how organizational practices are socially constructed), I have an ASR on market information regimes (ie, how socially constructed market data shapes market behavior), and my current project is on relational work (ie, how exchange is socially constructed as market or social). I also advise grad students on these sorts of topics. So it’s not like I’m some angry epistemological realist who goes around giving swirlies to phenomenologists.

Social construction is a really useful concept, but unfortunately, this really important concept has the misfortune of being popular with idiots who don’t really understand it. When this sort of person says “x is socially constructed” the implication is “therefore we can ignore x.” When I lecture on social constructionism I ridicule this sort of thing as “ruby slippers” social constructionism, as if your sociology professor tells you “why Dorothy, you’ve had the power to solve inequality all along, just click your heels three times and say ‘race is a social construct,’ ‘race is a social construct,’ ‘race is a social construct.'” If you really grok social constructionism, the appropriate reaction to somebody invoking the concept in almost any practical context is to shrug and say “your point being?” If you actually read Berger and Luckmann rather than just get the gist of it from some guy with whom you are smoking weed, you’ll see that the key aspects of social constructionism are intersubjectivity and institutions. That is social construction is important because social interaction is premised on shared conventions and becomes deeply codified to the extent that for most purposes it might as well be objective.

Suppose you had two contractors bidding on remodeling your kitchen. One of them says that it will be done in X days, involving Y materials, and cost you $Z. The other gives you a fascinating (but at times dubious) lecture about whether time exists in the abstract or only relative to perception, the ugly history of exploitation in the formica industry, and the chartalist theory of money. You then go back to the first contractor, who is bewildered and has no rebuttal to the second contractor’s very, um, creative arguments. You would have to be an idiot to award the bid to the second contractor, even if you think they are right about everything they said. As it happens, I actually believe that time, kitchen materials, and money are all socially constructed. It is also true that kitchen remodeling is also a social construct and one of the conventions of that particular social construct is that you talk about things like time, material, and price rather than offer a critical perspective on the same.

March 18, 2016 at 8:03 pm 6 comments


| Gabriel |

This morning Governor Chris Christie endorsed Donald Trump for president. There was widespread speculation that this reflected Christie hoping for an appointment as Attorney General in the event of a Trump victory. This was met with widespread disgust from mainstream conservative intellectuals, all of whom despise Trump (and immediately prior to the endorsement were delighting in Rubio having learned to fight Trump at his own insult comic game).  Over on Twitter, Josh Barro observed that it is precisely Trump’s outsider nature that makes endorsing him attractive for an ambitious Republican politician.

This struck me as very astute and reminded me of Gould’s 2002 AJS on The Origins of Status Hierarchies. This model starts with a cumulative advantage model for status. The trick with cumulative advantage models though is to avoid their natural tendency towards absolute inequality and so the models always have some kind of braking mechanism so the histogram ends up as a power-law, not a step function. For instance, Rosen 1981 uses heterogeneity of taste and diminishing marginal returns to avoid what would otherwise be the implication of his model of exactly one celebrity achieving universal acclaim. Anyway, the point is that cumulative advantage models need a brake, and Gould’s brake is reciprocity. Gould observes that attention and resources are finite and so when someone has many followers, they lose the ability to reciprocate with them. To the extent that followers are attentive not only to the status of a patron, but the attention and resources the patron reciprocates, then their high numbers of followers will swamp the ability of high status patrons to reciprocate and so inhibit their ability to attract new followers. For instance, a grad student might rationally prefer to work with an associate professor who has only a few advisees and so can spend several hours a week with each of them than with a Nobel Laureate who has so many advisees he doesn’t recognize some of them in the hallway.

In this sense, Rubio as the clear favorite of the party establishment has already recruited great masses of political talent. Should Rubio win in November, he will have an embarrassment of riches in terms of followers with whom to fill cabinet positions and other high-ranking political roles. That is to say, Rubio’s ability to reciprocate the support of his followers is swamped by the great number of followers he has acquired. (I’m talking about followers among the sorts of people likely to be appointed to administration positions, I’ll get to voters later). This then makes some potential followers decide to affiliate with a patron who is not too busy for them, and hence Chris Christie is hoping to spend the next eight years building RICO cases against people who use the term “short-fingered vulgarian.”

But, there’s a problem with this, which is that status itself provides resources, especially in a system where power is not continuous but winner-take-all. (The discontinuity is really important, as Schilke and I argued recently). In this sense, it shouldn’t matter that a candidate with few endorsements has the fewest supporters competing for patronage because that candidate would lose and so not have patronage to allocate. That would be true if the political science model nicknamed “the party decides”(which we can generalize as the endogeneity of status competition) were true. But if that model were true, we would be seeing Rubio (who recruited the most intellectuals) or Jeb! (who raised the most money) as the clear front-runner and that is anything but the case since the GOP primary this cycle has been consistently dominated by outsiders (Trump, briefly Carson, and even Cruz, who is a senator but a notably un-collegial one).

This then suggests that we have to recognize that power, including the ability to allocate resources to followers, is not necessarily a function of how many followers one has. In ordinary times it might be, especially in the Republican party which normally follows the party decides model. However in this year it is clear that popularity in opinion polls and primaries/caucuses has no (positive) correlation with establishment support. This may be because Trump, like Lenin, is a figure of such immense charisma that he can defy the models. Or it may be that the base is revolting over a substantive issue like immigration. Or maybe the support of neo-Nazis with a bizarre interest in anime and the Frankfurt school is the secret sauce. Whatever the exact nature of why the party decides model is breaking, the fact is that it is. The Republican primary reminds me of Bourdieu’s model of a field of mass cultural production and a restricted field of production. Rubio is clearly dominating in the restricted field of elite conservative opinion, but that does him very little good considering how effective Trump is at the mass field. If we view the competition for endorsements not as an isolated system, but one that is loosely coupled to an adjacent system of competition for voters, then the status competition for endorsements is no longer entirely endogenous but there is a source of exogenous power shaping it. (In the Gould model this would be subsumed as part of Q_j). Hence Trump’s great popularity with voters despite his great unpopularity with party elites makes him more attractive than he would otherwise be to party elites who will break ranks and affiliate with the demagogue.

In Trump’s case, his fame, wit, and shamelessness have gained him the support of voters and this has disrupted the otherwise endogenous system of endorsements, however the model could generalize to any source of power outside of the endogenous process of consensus building within party elites. A very similar model would apply to those political actors who welcome a foreign invader as supporters in domestic disputes they would otherwise lose. Americans take for granted that the opposition party will be a loyal opposition and so we abide by the maxim that “politics ends at the water’s edge,” which is why periods like the Second Red Scare (or from the other perspective, the Popular Front that preceded it) seem so anomalous. However for centuries, machinations to set yourself up as a client-state after relying on imperial powers to depose the current batch of elites is most of what politics was. In such a scenario, a political actor who lacks much power within the internal dynamics of oligarchy could still acquire followers if they seemed to be favored by the forces massing across the border. So we might expect a lot of ambitious mitteleuropean politicians to affiliate with heretofore minor fascist parties c 1938, or with heretofore minor communist parties c 1943.

February 26, 2016 at 5:21 pm

Older Posts

The Culture Geeks