You are on page 1of 3

NAMA : ANDREAN SERGIO

NIM : 1907016028
PRODI : STATISTIKA
LAMPIRAN UTS STATISTIKA SPASIAL
Lampiran 1. Sintaks dengan menggunakan software R
library(spdep)
data=read.table(file.choose(),header=TRUE)
data
attach(data)
b1=as.numeric(data$IPM)
b1
bobot=read.table(file.choose(),header=FALSE)
bobot
bot=as.matrix(bobot)
bot
wbot=mat2listw(bot)
wbot

#IndeksMoran
moran.test(b1,nb2listw(wbot$neighbours,style="W"),alternative=
"two.sided")

#LISA
localmoran(b1,nb2listw(wbot$neighbours,style="W"),alternative=
"two.sided")

#GearyRatio
geary.test(b1,nb2listw(wbot$neighbours,style="W"),alternative=
"two.sided")
Lampiran 2. Perhitungan Autokorelasi Spasial
Output 1. Data Penelitian

Output 2

Output 3. Pembobotan Geogfrafis

Output 4. Indeks Moran


Output 5. Local Indicators of Spatial Association (LISA)

Output 6. Geary’s Ratio

You might also like