Skip to content

Commit

Permalink
Merge pull request #710 from KingArthur0205/main
Browse files Browse the repository at this point in the history
MMF_Solis_2020
  • Loading branch information
KingArthur0205 authored Nov 26, 2024
2 parents 90b4435 + 7cc0ede commit 475d9a2
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions data/MMF_Solis_2020.r
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Paper: https://www.cambridge.org/core/journals/british-journal-of-political-science/article/measuring-media-freedom-an-item-response-theory-analysis-of-existing-indicators/4A6D5AE5E6F4E78D0642BFF882C1FBF6
# Data: https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/ENOEQS
# Issue: https://github.com/ben-domingue/irw/issues/599

library(haven)
library(dplyr)
library(tidyr)

df <- read.csv("irt_full.csv")
df$id <- seq_len(nrow(df))
df <- df |>
select(-cow, -year)
df <- pivot_longer(df, cols=-id, names_to="item", values_to="resp")
df <- na.omit(df)

save(df, file="MMF_Solis_2020.Rdata")
write.csv(df, "MMF_Solis_2020.csv", row.names=FALSE)

0 comments on commit 475d9a2

Please sign in to comment.