This is fact-check analysis of Turkish politicians. The data has two sources: The first source is www.dogrulukpayi.com. The second source is compiled by the author during a LAP project of Atilim University.

Data prep

rm(list=ls(all=TRUE)) 


setwd("D:/emre/SkyDrive/makale/FactCheck")
library(lessR)
## 
## lessR 3.5.0      feedback: gerbing@pdx.edu      web: lessRstats.com
## -------------------------------------------------------------------
## 1. Read a text, Excel, SPSS, SAS or R data file from your computer
##    into the mydata data table, enter:  mydata <- Read()  
## 2. For a list of help topics and functions, enter:  Help()
## 3. Use theme function for global settings, Ex: theme(colors="gray")
library(foreign)
library(nnet)
library(effects)
library(car)
## 
## Attaching package: 'car'
## The following object is masked from 'package:effects':
## 
##     Prestige
## The following objects are masked from 'package:lessR':
## 
##     bc, Recode, sp
library(reshape)
library(sjPlot)
## Visit http://strengejacke.de/sjPlot for package-vignettes.
library(plyr)
## 
## Attaching package: 'plyr'
## The following objects are masked from 'package:reshape':
## 
##     rename, round_any
library(pander)


mydata <- read.csv("combinedR.csv")
mydata$Tone <- NULL

Binary DV

mydata$b.fact <- mydata$Scale3
#0 False, 1 True
mydata$b.fact[mydata$b.fact==2] <- NA
mydata$b.fact[mydata$b.fact==3] <- 0
mydata$b.fact <- as.factor(mydata$b.fact)
levels(mydata$b.fact)[levels(mydata$b.fact)=="0"] <- "False"
levels(mydata$b.fact)[levels(mydata$b.fact)=="1"] <- "True"

Sorting the IVs

mydata$Party[mydata$Party == 1] <- "AKP"
mydata$Party[mydata$Party == 2] <- "CHP"
mydata$Party[mydata$Party == 3] <- "MHP"
mydata$Party[mydata$Party == 4] <- "HDP"
mydata$Party[mydata$Party == 5] <- "Others"
mydata$f.party <- as.factor(mydata$Party)
mydata$f.party <- relevel(mydata$f.party, ref = "AKP")


mydata$f.topic <- NA
mydata$f.topic[mydata$Topic=="Ekonomi"] <- 1
mydata$f.topic[mydata$Topic=="Mali Politikalar"] <- 1
mydata$f.topic[mydata$Topic=="Sanayi, Ticaret ve Finans"] <- 1
mydata$f.topic<-recode(mydata$f.topic,"NA=0")
mydata$f.topic[mydata$f.topic==1] <- "Economy"
mydata$f.topic[mydata$f.topic==0] <- "Other Issues"
mydata$f.topic <- as.factor(mydata$f.topic)

Basic Plots

sjp.frq(mydata$b.fact)

sjp.xtab(mydata$f.topic, mydata$b.fact,  margin = "row", bar.pos = "stack", coord.flip = TRUE, 
         show.n = FALSE, show.prc = TRUE,  axis.titles = "Message Medium", geom.colors = c("red", "green"))

sjp.xtab(mydata$f.party, mydata$b.fact, margin = "row", bar.pos = "stack", coord.flip = TRUE, 
         show.n = FALSE, show.prc = TRUE,  axis.titles = "Message Sender Party", geom.colors = c("red", "green"))

The Model

mod <- glm(b.fact ~ f.topic + f.party, data=mydata, family="binomial")
modt <- sjt.glm(mod)
## Waiting for profiling to be done...
pander(modt)
## Warning in pander.default(modt): No pander.method for "sjTable", reverting
## to default.No pander.method for "sjtglm", reverting to default.
sjp.glm(mod)
## Waiting for profiling to be done...