Clear Language, Clear Mind

October 5, 2016

ggplot2 functions in kirkegaard package

Filed under: knitr — Emil O. W. Kirkegaard @ 22:19

http://rpubs.com/EmilOWK/215493

September 15, 2016

How to add names to choroplethr ggplot2 maps

Filed under: knitr,R — Tags: — Emil O. W. Kirkegaard @ 16:44

A brief tutorial on how to add names to choroplethr maps in R.

india1india2

 

 

September 6, 2016

Cognitive ability and political preferences in Denmark: knitr edition

http://rpubs.com/EmilOWK/208757

Analysis of the data collected so far, presented side by side with R code. It will be expanded into a proper paper and submitted to OQSPS soonish. Soonish here meaning when Noah gets around to do it!

Due to the surprising results, we should probably do a follow-up replication using new subjects. These results are hard to believe in the light of earlier findings from other countries based on larger samples etc.

Summary for the less math inclined:

  • Despite virtually every other published study, we did not find much correlation between preferences for personal and economic freedom and cognitive ability: r’s about .05.
  • Self-rated preference for personal freedom correlated very poorly with measured preferences, r≈.10, but for economic freedom, the correlation was alright r≈.50. This means one can use the latter as an okay proxy, but not the first. People don’t seem to have an idea of how important they actually think personal freedoms are relative to other people.
  • There was little to none correlation between the political axes, r≈.10. This means that one cannot summarize people’s political preferences using only 1 dimension such as the popular left-wing axis.
  • Using people’s self-rated agreement with parties, one can estimate the political positions of the parties. Doing so using people’s self-rated preferences recreated the familiar left-right economic axes, but not the personal freedom axes, since all parties were about equally in favor of personal freedoms. However, using measured preferences, the left-economic parties were found to be less in favor of personal freedoms than the right-economic parties. The result is that the party political dimensions are highly correlated (about r≈.80) and so one can summarize the parties using a 1-dimensional model.

Powered by WordPress