Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
vuoi
o PayPal
tutte le volte che vuoi
PARENT")
hist(challenging$PARENT_TOT, freq= FALSE, breaks= c(0,
0.5,1.5,2.5,3.5,4.5,5.5, 6.5),col = colors, main =
"Histogram of 'Challenging' PARENT-TOT", xlab = "TOT. CASES
WITH PARENT")
hist(others$PARENT_TOT, freq= FALSE, breaks= c(0,
0.5,1.5,2.5,3.5,4.5,5.5, 6.5),col = colors, main =
"Histogram of 'Others' PARENT-TOT", xlab = "TOT. CASES WITH
PARENT")
# histograms of the total cases for each reason
hist(quiet$REASON_PRODOTTI, freq= FALSE, breaks= c(0,
0.5,1.5,2.5,3.5,4.5),col = colors, main = "Histogram of
'Quiet' Reason_Prodotti", xlab = "Cases With Reason
107
Prodotti")
hist(challenging$REASON_PODOTTI, freq= FALSE, breaks=
c(0,0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,11.5,12.5,
13.5,14.5,15.5, 16.5,17.5,18.5,19.5),col = colors, main =
"Histogram of 'Challenging' Reason_Prodotti", xlab = "Cases
With Reason Prodotti")
hist(others$REASON_PRODOTTI, freq= FALSE, breaks=
c(0,0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,11.5,12.5,
13.5,14.5,15.5, 16.5,17.5,18.5,19.5),col = colors, main =
"Histogram of 'Others' Reason_Prodotti", xlab = "Cases With
Reason Prodotti")
hist(quiet$REASON_ORDINI, freq= FALSE, col = colors, main =
"Histogram of 'Quiet' Reason_Ordini", xlab = "Cases With
Reason Ordini")
hist(challenging$REASON_ORDINI, freq= FALSE, col = colors,
main = "Histogram of 'Challenging' Reason_Ordini", xlab =
"Cases With Reason Ordini")
hist(others$REASON_ORDINI, freq= FALSE,col = colors, main =
"Histogram of 'Others' Reason_Ordini", xlab = "Cases With
Reason ordini")
hist(quiet$REASON_AMM, freq= FALSE, breaks= c(0,
0.5,1.5,2.5,3.5,4.5,5.5), col = colors, main = "Histogram
of 'Quiet' Reason_Amministrazione", xlab = "Cases With
Reason Amministrazione") 108
hist(challenging$REASON_AMM, freq= FALSE, breaks=
c(0,0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,11.5,12.5)
, col = colors, main = "Histogram of 'Challenging'
Reason_Amministrazione", xlab = "Cases With Reason
Amministrazione")
hist(others$REASON_AMM, freq= FALSE,breaks=
c(0,0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,11.5,12.5,
13.5,14.5,15.5, 16.5),col = colors, main = "Histogram of
'Others' Reason_Ordini", xlab = "Cases With Reason ordini")
hist(quiet$`REASON_HELP/INFO`, freq= FALSE, breaks= c(0,
0.5,1.5,2.5,3.5,4.5,5.5), col = colors, main = "Histogram
of 'Quiet' Reason_Help/Info", xlab = "Cases With Reason
Help/Info")
hist(challenging$`REASON_INFO/HELP`, freq= FALSE, breaks=
c(0,0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,11.5,12.5,
13.5,14.5,15.5), col = colors, main = "Histogram of
'Challenging' Reason_Help/Info", xlab = "Cases With Reason
Help/Info")
hist(others$`REASON_HELP/INFO`, freq= FALSE,breaks=
c(0,0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,11.5,12.5,
13.5,14.5,15.5, 16.5,17.5,18.5,19.5,20.5,21.5,22.5),col =
colors, main = "Histogram of 'Others' Reason_Help/Info",
xlab = "Cases With Reason Help/Info")
hist(quiet$REASON_QUALITY, freq= FALSE, breaks=
109
c(0,0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,11.5,12.5,
13.5,14.5), col = colors, main = "Histogram of 'Quiet'
Reason_quality/Problem", xlab = "Cases With Reason
Quality/Problem")
hist(challenging$REASON_QUALITY, freq= FALSE, breaks=
c(0,0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,11.5,12.5,
13.5,14.5,15.5,
16.5,17.5,18.5,19.5,20.5,21.5,22.5,23.5,24.5,25.5,26.5,27.5
,28.5,29.5,30.5,31.5,32.5,33.5), col = colors, main =
"Histogram of 'Challenging' Quality/Problem", xlab = "Cases
With Reason Quality/Problem")
hist(others$REASON_QUALITY, freq= FALSE,breaks=
c(0,0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,11.5,12.5,
13.5,14.5,15.5,
16.5,17.5,18.5,19.5,20.5,21.5,22.5,23.5,24.5,25.5,26.5,27.5
,28.5,29.5),col = colors, main = "Histogram of 'Others'
Reason_Quality/Problem", xlab = "Cases With Reason
Quality/Problem")
• Code used for regression models with dependent variable Total Amount
ID_mt <- factor(totamount$ID)
Mese_mt <- factor(totamount$Mese)
dataset_fact_t <- totamount[,-1]
dataset_fact_t <- dataset_fact_t[,-1]
110
dataset_finale_t <- data.frame(ID_mt , Mese_mt ,
dataset_fact_t)
dataset_finale_t$TotAmount = dataset_finale_t$TotAmount/100
panel_mt <- pdata.frame(dataset_finale_t, index =
c("ID_mt", "Mese_mt"))
# Random effects model
RAND_m3<- plm(TotAmount ~
Status_CLOSED+Solution_SOLVED+Parent_C+Reason_PRODOTTI_C+Re
ason_ORDINI_C+Reason_AMMINISTRAZIONE_C +
Reason_HELP.INFO_C+`Reason_QUALI.PROBL_C`+SLA_Resp+OneConta
ct_True+ CASE_TOT_CREATI, data= panel_mt, model= "random")
# Fixed effects model
fix_m3<- plm(TotAmount ~
Status_CLOSED+Solution_SOLVED+Parent_C+Reason_PRODOTTI_C+Re
ason_ORDINI_C+Reason_AMMINISTRAZIONE_C +
Reason_HELP.INFO_C+`Reason_QUALI.PROBL_C`+SLA_Resp+OneConta
ct_True+ CASE_TOT_CREATI, data= panel_mt, model= "within")
# Hausman Test
phtest(fix_m3,RAND_m3)
# Fixed effects model with robust errors
coeftest(fix_m3,vcovHC) 111
# Arellano-Bond model (with different lags)
din_1_m3<- pgmm(TotAmount ~
lag(TotAmount,1)+CASE_TOT_CREATI+
Status_CLOSED+Solution_SOLVED+Solution_NOTSOLVED+Parent_C+R
eason_PRODOTTI_C+Reason_ORDINI_C+Reason_AMMINISTRAZIONE_C +
Reason_HELP.INFO_C+`Reason_QUALI.PROBL_C`+SLA_Resp+OneConta
ct_True|lag(TotAmount, 2:11), data= panel_mt, model =
"twosteps", effect = "individual")
din_2_m3<- pgmm(TotAmount ~
lag(TotAmount,2)+CASE_TOT_CREATI+
Status_CLOSED+Solution_NOTSOLVED+Parent_C+Reason_PRODOTTI_C
+Reason_ORDINI_C+Reason_AMMINISTRAZIONE_C +
Reason_HELP.INFO_C+`Reason_QUALI.PROBL_C`+SLA_Resp+OneConta
ct_True|lag(TotAmount, 3:11), data= panel_mt, model =
"twosteps", effect = "individual")
din_3_m3<- pgmm(TotAmount ~
lag(TotAmount,3)+CASE_TOT_CREATI+
Status_CLOSED+Solution_NOTSOLVED+Parent_C+Reason_PRODOTTI_C
+Reason_ORDINI_C+Reason_AMMINISTRAZIONE_C +
Reason_HELP.INFO_C+`Reason_QUALI.PROBL_C`+SLA_Resp+OneConta
ct_True|lag(TotAmount, 4:11), data= panel_mt, model =
"twosteps", effect = "individual")
din_4_m3<- pgmm(TotAmount ~ 112
lag(TotAmount,4)+CASE_TOT_CREATI+
Status_CLOSED+Solution_NOTSOLVED+Parent_C+Reason_PRODOTTI_C
+Reason_ORDINI_C+Reason_AMMINISTRAZIONE_C +
Reason_HELP.INFO_C+`Reason_QUALI.PROBL_C`+SLA_Resp+OneConta
ct_True|lag(TotAmount, 5:11), data= panel_mt, model =
"twosteps", effect = "individual")
din_5_m3<- pgmm(TotAmount ~
lag(TotAmount,1:2)+CASE_TOT_CREATI+
Status_CLOSED+Solution_SOLVED+NOSOL_Fraz+Parent_C+Reason_PR
ODOTTI_C+Reason_ORDINI_C+Reason_AMMINISTRAZIONE_C +
Reason_HELP.INFO_C+`Reason_QUALI.PROBL_C`+SLA_Resp+OneConta
ct_True|lag(TotAmount, 3:11), data= panel_mt, model =
"twosteps", effect = "individual")
din_6_m3<- pgmm(TotAmount ~
lag(TotAmount,1:3)+CASE_TOT_CREATI+
Status_CLOSED+Solution_SOLVED+NOSOL_Fraz+Parent_C+Reason_PR
ODOTTI_C+Reason_ORDINI_C+Reason_AMMINISTRAZIONE_C +
Reason_HELP.INFO_C+`Reason_QUALI.PROBL_C`+SLA_Resp+OneConta
ct_True|lag(TotAmount, 4:11), data= panel_mt, model =
"twosteps", effect = "individual")
din_7_m3<- pgmm(TotAmount ~
lag(TotAmount,1:4)+CASE_TOT_CREATI+
Status_CLOSED+Solution_SOLVED+NOSOL_Fraz+Parent_C+Reason_PR
113
ODOTTI_C+Reason_ORDINI_C+Reason_AMMINISTRAZIONE_C +
Reason_HELP.INFO_C+`Reason_QUALI.PROBL_C`+SLA_Resp+OneConta
ct_True|lag(TotAmount, 5:11), data= panel_mt, model =
"twosteps", effect = "individual")
din_8_m3<- pgmm(TotAmount ~
lag(TotAmount,1:5)+CASE_TOT_CREATI+
Status_CLOSED+Solution_SOLVED+NOSOL_Fraz+Parent_C+Reason_PR
ODOTTI_C+Reason_ORDINI_C+Reason_AMMINISTRAZIONE_C +
Reason_HELP.INFO_C+`Reason_QUALI.PROBL_C`+SLA_Resp+OneConta
ct_True|lag(TotAmount, 6:11), data= panel_mt, model =
"twosteps", effect = "individual")
• Code used for regression models with dependent variable “Cases created”
ID_m3 <- factor(Cartel4$ID)
Mese_m3 <- factor(Cartel4$Mese)
dataset_fact_3 <- Cartel4[,-1]
dataset_fact_3 <- dataset_fact_3[,-1]
dataset_finale_m3 <- data.frame(ID_m3 , Mese_m3 ,
dataset_fact_3)
dataset_finale_m3$TotAmount =
dataset_finale_m3$TotAmount/100
panel_m3 <- pdata.frame(dataset_finale_m3, index =
c("ID_m3", "Mese_m3")) 114
# Poisson model with random effects
pois_random_m3<- pglm(CASE_TOT_CREATI ~
Status_CLOSED+Solution_SOLVED+Parent_C+Reason_PRODOTTI_C+Re
ason_ORDINI_C+Reason_AMMINISTRAZIONE_C +
Reason_HELP.INFO_C+`Reason_QUALI.PROBL_C`+SLA_Resp+OneConta
ct_True+TotAmount, data= panel_m3, model= "random", family
= "poisson")
# Poisson model with fixed effects
pois_fixed_m3<- pglm(CASE_TOT_CREATI ~
Status_CLOSED+Solution_SOLVED+Parent_C+Reason_PRODOTTI_C+Re
ason_ORDINI_C+Reason_AMMINISTRAZIONE_C +
Reason_HELP.INFO_C+`Reason_QUALI.PROBL_C`+SLA_Resp+OneConta
ct_True+TotAmount, data= panel_m3, model= "within", family
= "poisson")
# Hausman Test
phtest(pois_fixed_m3,pois_rand_m3)
# Fixed effects model with robust errors
coeftest(pois_fixed_m3, vcov = sandwich)
# Arellano-Bond model (with different lags)
din_1_m3<- pgmm(CASE_TOT_CREATI ~
lag(CASE_TOT_CREATI,1)+TotAmount+
115
Status_CLOSED+Solution_SOLVED+Solution_NOTSOLVED+Parent_C+R
eason_PRODOTTI_C+Reason_ORDINI_C+Reason_AMMINISTRAZIONE_C +
Reason_HELP.INFO_C+`Reason_QUALI.PROBL_C`+SLA_Resp+OneConta
ct_True|lag(CASE_TOT_CREATI, 2:11), data= panel_m3, model =
"twosteps", effect = "individual")
din_2_m3<- pgmm(CASE_TOT_CREATI ~
lag(CASE_TOT_CREATI,2)+TotAmount+
Status_CLOSED+Solution_NOTSOLVED+Parent_C+Reason_PRODOTTI_C
+Reason_ORDINI_C+Reason_AMMINISTRAZIONE_C +
Reason_HELP.INFO_C+`Reason_QUALI.PROBL_C`+SLA_Resp+OneConta
ct_True|lag(CASE_TOT_CREATI, 3:11), data= panel_m3, model =
"twosteps", effect = "individual")
din_3_m3<- pgmm(CASE_TOT_CREATI ~
lag(CASE_TOT_CREATI,3)+TotAmount+
Status_CLOSED+Solution_NOTSOLVED+Parent_C+Reason_PRODOTTI_C
+Reason_ORDINI_C+Reason_AMMINISTRAZIONE_C +
Reason_HELP.INFO_C+`Reason_QUALI.PROBL_C`+SLA_Resp+OneConta
ct_True|lag(CASE_TOT_CREATI, 4:11), data= panel_m3, model =
"twosteps", effect = "individual")
din_4_m3<- pgmm(CASE_TOT_CREATI ~
lag(CASE_TOT_CREATI,4)+TotAmount+
Status_CLOSED+Solution_NOTSOLVED+Parent_C+Reason_PRODOTTI_C
+Reason_