data(data_HPI)
data_HPI_2019 = data_HPI[data_HPI$year==2019,]
Indic_name = c("Life_Expectancy","Ladder_of_life","Ecological_Footprint")
Indic_norm = normalise_ci(data_HPI_2019, Indic_name, c("POS","POS","NEG"),method=2)$ci_norm
Indic_norm = Indic_norm[Indic_norm$Life_Expectancy>0 &
Indic_norm$Ladder_of_life>0 &
Indic_norm$Ecological_Footprint >0,]
Indic_CI = data.frame(Indic_norm,
data_HPI_2019[rownames(Indic_norm),
c("lat","long","HPI","ISO","Country")])
atleast = 2
coord = Indic_CI[,c("lat","long")]
CI_ogwa_n = ci_ogwa(Indic_CI, id="ISO",
indic_col=c(1:3),
atleastjp=atleast,
coords=as.matrix(coord),
kernel = "gaussian",
adaptive=FALSE,
longlat=FALSE)$CI_OGWA_n
#CI_ogwa_p = ci_ogwa(Indic_CI, id="ISO",
# indic_col=c(1:3),
# atleastjp=atleast,
# coords=as.matrix(coord),
# kernel = "gaussian",
# adaptive=FALSE,
# longlat=FALSE)$CI_OGWA_p
Run the code above in your browser using DataLab