We are aimed to find solution for following reasearch questions:
The government support factors which are meant to combat COVID-19 and offer supports to affected economy. Thus, we have graph following three correlation charts based on each individual index: Strigency index, government response index, and economic support index.
main[is.na(main)] <- 0
main_str = as.data.frame(c(main[,16],main[,19:20],main[,22]))
main_gov = as.data.frame(c(main[,17],main[,19:20],main[,22]))
main_eco = as.data.frame(c(main[,18:20],main[,22]))
X = cor(main_str)
Y = cor(main_gov)
Z = cor(main_eco)
corrplot(X, method ="square")
corrplot(Y, method = "square")
corrplot(Z, method = "square")
str_gov <- matcor(X,Y)
str_eco <- matcor(X,Z)
gov_eco <- matcor(Y,Z)
img.matcor(str_gov, type = 2)
img.matcor(str_eco, type = 2)
img.matcor(gov_eco, type = 2)
#Hypothesis: H0: There’s no significant difference on economic factors before and after applying government measures H1:There’s significant difference on economic factors before and after applying government measures
##Not sure how to interpret this model….
m1 = lmer(StringencyIndex ~ PMI_PCT + (1|PCI_Type) + (1 | Period), data = main)
summary(m1)
## Linear mixed model fit by REML ['lmerMod']
## Formula: StringencyIndex ~ PMI_PCT + (1 | PCI_Type) + (1 | Period)
## Data: main
##
## REML criterion at convergence: 1609.9
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.7784 -0.7609 -0.2138 0.5636 2.9661
##
## Random effects:
## Groups Name Variance Std.Dev.
## PCI_Type (Intercept) 142.6 11.94
## Period (Intercept) 667.9 25.84
## Residual 483.6 21.99
## Number of obs: 178, groups: PCI_Type, 3; Period, 3
##
## Fixed effects:
## Estimate Std. Error t value
## (Intercept) 55.144 16.557 3.331
## PMI_PCT 3.624 4.464 0.812
##
## Correlation of Fixed Effects:
## (Intr)
## PMI_PCT -0.008
confint(m1)
## Computing profile confidence intervals ...
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in profile.merMod(object, which = parm, signames = oldNames, ...): non-
## monotonic profile for (Intercept)
## Warning in confint.thpr(pp, level = level, zeta = zeta): bad spline fit for
## (Intercept): falling back to linear interpolation
## 2.5 % 97.5 %
## .sig01 4.931264 38.26194
## .sig02 11.148046 65.37566
## .sigma 19.805556 24.45829
## (Intercept) 17.648412 92.82467
## PMI_PCT -5.139266 12.40322
ranef(m1) %>% head(5)
## $PCI_Type
## (Intercept)
## High -9.287724
## Low 12.996499
## Medium -3.708775
##
## $Period
## (Intercept)
## COVID Month 19.00773
## Post COVID 10.11656
## Pre COVID -29.12429