0% found this document useful (0 votes)
41 views5 pages

Maksimum 9123 (Banggae Timur) Minimum 1959 (Tubo) Rata-Rata 5073.875 Simpangan Baku 2752.763

The document analyzes unemployment data from 8 regions in Majene, Indonesia. It finds that Banggae Timur had the highest unemployment rate at 9123, while Tubo had the lowest at 1959. The average unemployment rate across all regions was 5073.875. A Moran's I test was conducted and found a Moran's I statistic of 0.769 and a p-value of 0.001, indicating significant spatial autocorrelation in the unemployment rates.

Uploaded by

Arman febriyan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views5 pages

Maksimum 9123 (Banggae Timur) Minimum 1959 (Tubo) Rata-Rata 5073.875 Simpangan Baku 2752.763

The document analyzes unemployment data from 8 regions in Majene, Indonesia. It finds that Banggae Timur had the highest unemployment rate at 9123, while Tubo had the lowest at 1959. The average unemployment rate across all regions was 5073.875. A Moran's I test was conducted and found a Moran's I statistic of 0.769 and a p-value of 0.001, indicating significant spatial autocorrelation in the unemployment rates.

Uploaded by

Arman febriyan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

10000 9123

9000 8002
Jumlah Pengangguran

8000
7000 6647
6000 5457
4848
5000
4000
3000 2451 2104 1959
2000
1000
0
2 BANGGAE 4 PAMBOANG 1 BANGGAE 5 SENDANA 3 MALUNDA 6 TAMMERODO 8 ULUMANDA 7 TUBO
TIMUR

Wilayah

Maksimum 9123 (Banggae Timur)


Minimum 1959 (Tubo)
Rata-Rata 5073.875
Simpangan
Baku 2752.763

> im

Moran I test under randomisation

data: as.numeric(data$RATA.RATA)
weights: lw

Moran I statistic standard deviate = 3.0187, p-value = 0.001269


alternative hypothesis: greater
sample estimates:
Moran I statistic Expectation Variance
0.76900177 -0.14285714 0.09124435

Indeks Moran 0.679


Nilai P 0.001
Simpangan Baku 3.019
Syntax

##DATA##

data<-read.csv("D:/PASCA CAMPUS/Data Pengangguran.csv", sep =";", header=T)

str(data)

library(rgdal)

library(arules)

shp<-readOGR(dsn="D:/PASCA CAMPUS/Projek Demam Tifoid/majene", layer="BATAS KECAMATAN


DESEMBER 2019 DUKCAPIL")

spplot(shp)

## membuat peta ##

k=16

colfunc <- colorRampPalette(c("yellow","green","blue"))

color<- colfunc(k)

library(sp)

shp$tifoid<-data$RATA.RATA

spplot(shp, "tifoid", col.regions=color)

## DATA ##

data<-read.csv("D:/PASCA CAMPUS/Data Pengangguran.csv", sep =";", header=T)

library(rgdal)

library(arules)

shp<-readOGR(dsn="D:/PASCA CAMPUS/Projek Demam Tifoid/majene", layer="BATAS KECAMATAN


DESEMBER 2019 DUKCAPIL")
spplot(shp)

library(spdep)

library(raster)

## MATRIKS BOBOT QUEEN CONTIGUITY##

w<-poly2nb(shp, queen=T)

wm<-nb2mat(w, style='B', zero.policy = T)

write.csv(wm,"D:/PASCA CAMPUS/Projek Demam Tifoid/contiguity.csv")

dim(wm)

i<-rowSums(wm)

kec<-shp$KECAMATAN

diag(wm)<-0

rtot<-rowSums(wm, na.rm =T)

rtot

wmatr<-wm/rtot

rowSums(wmatr, na.rm=T)

lw<-mat2listw(wmatr, style="W")

lw

## INDEKS MORAN 2014##

im<-moran.test(as.numeric(data$RATA.RATA), lw,randomisation=T,zero.policy=T,
alternative="greater")

## LISA ##

LISA2019<-localmoran(tahun2019$KASUS,lw)
## MORAN SCATTER PLOT ##

n<-length(data)

y<-as.numeric(data$RATA.RATA)

ybar<-mean(y)

ms<- cbind(id=rep(1:n,each=n),

y=rep(y,each=n),

value=as.vector((wm*y)))

ms<-ms[ms[3]>0,]

ams<-aggregate(ms[,2:3], list(ms[,1]), FUN=mean)

ams<-ams[,-1]

colnames(ams) <-c('y', 'spatially lagged y')

head(ams)

plot(ams)

reg<-lm(ams[,2] ~ ams[,1])

abline(reg, lwd=2)

abline(h=mean(ams[,2]), lt=2)

abline(v=ybar, lt=2)

coefficients(reg)[2]

rwm<-mat2listw(wm, style='W')

# Checking if rows add up to 1

mat <-listw2mat(rwm)

apply(mat, 1, sum)[1:8]

moran.plot(y, rwm,

labels=data$KECAMATAN)

You might also like