# NOT RUN {
data(data_corpus_irish30, package = "quantedaData")
iedfm <- dfm(data_corpus_irish30, remove_punct = TRUE)
wordshoalfit <-
textmodel_wordshoal(iedfm, dir = c(7,1),
groups = docvars(data_corpus_irish30, "debateID"),
authors = docvars(data_corpus_irish30, "member.name"))
fitdf <- merge(as.data.frame(summary(wordshoalfit)),
docvars(data_corpus_irish30),
by.x = "row.names", by.y = "member.name")
fitdf <- subset(fitdf, !duplicated(memberID))
aggregate(theta ~ party.name, data = fitdf, mean)
# }
Run the code above in your browser using DataLab