library(car)
## Warning: package 'car' was built under R version 4.3.3
## Loading required package: carData
library(lmtest)
## Loading required package: zoo
##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
library(spgwr)
## Warning: package 'spgwr' was built under R version 4.3.3
## Loading required package: sp
## Warning: package 'sp' was built under R version 4.3.3
## Loading required package: spData
## Warning: package 'spData' was built under R version 4.3.3
## To access larger datasets in this package, install the spDataLarge
## package with: `install.packages('spDataLarge',
## repos='https://nowosad.github.io/drat/', type='source')`
## NOTE: This package does not constitute approval of GWR
## as a method of spatial analysis; see example(gwr)
library(fBasics)
## Warning: package 'fBasics' was built under R version 4.3.3
##
## Attaching package: 'fBasics'
## The following object is masked from 'package:car':
##
## densityPlot
#install.packages("AICcmodavg", repos=c("http://rstudio.org/_packages","http://cran.rstudio.com",dependencies=TRUE))
#install.packages("unmarked", repos="http://cran.rstudio.com/", dependencies=TRUE)
library(unmarked)
## Warning: package 'unmarked' was built under R version 4.3.3
##
## Attaching package: 'unmarked'
## The following object is masked from 'package:sp':
##
## coordinates
## The following object is masked from 'package:car':
##
## vif
library(AICcmodavg)
## Warning: package 'AICcmodavg' was built under R version 4.3.3
library(foreign)
library(lattice)
library(zoo)
library(ape)
## Warning: package 'ape' was built under R version 4.3.3
library(Matrix)
library(mvtnorm)
library(emulator)
## Warning: package 'emulator' was built under R version 4.3.3
##
## Attaching package: 'emulator'
## The following object is masked from 'package:fBasics':
##
## tr
library(MLmetrics)
## Warning: package 'MLmetrics' was built under R version 4.3.3
##
## Attaching package: 'MLmetrics'
## The following object is masked from 'package:base':
##
## Recall
library(GWmodel)
## Warning: package 'GWmodel' was built under R version 4.3.3
## Loading required package: robustbase
## Warning: package 'robustbase' was built under R version 4.3.3
## Loading required package: Rcpp
## Warning: package 'Rcpp' was built under R version 4.3.3
## Registered S3 method overwritten by 'spdep':
## method from
## plot.mst ape
## Welcome to GWmodel version 2.3-3.
##
## Attaching package: 'GWmodel'
## The following object is masked from 'package:AICcmodavg':
##
## AICc
library(sp)
library(readxl)
dt <- read_excel("D:/Aetikel - Keterlibatan perempuan/DAta Fix Skripsi Yohanita.xlsx",
col_types = c("text", "numeric", "numeric",
"numeric", "numeric", "numeric",
"numeric", "numeric", "numeric",
"numeric", "numeric", "numeric", "numeric"))
head(dt, 5)
## # A tibble: 5 × 13
## Provinsi Y X1 X2 X3 X4 X5 X6 X7 X8 X9 U
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 ACEH 11.1 46.2 72.2 0.216 42.9 80.8 34.9 30.5 54.1 4.21 96.7
## 2 BALI 16.4 69.6 74.5 0.209 43.2 83.2 39.1 36.4 51.2 4.84 115.
## 3 BANTEN 17.6 47.2 72.4 0.261 40.1 78.8 31.7 35.8 42.2 5.03 106.
## 4 BENGKULU 15.6 54.4 71.7 0.318 38.7 73.2 35.3 23.2 53.3 4.31 102.
## 5 DI YOGYAKAR… 20 63.4 76.9 0.146 47.1 85.6 41.4 32.9 53.1 5.15 110.
## # ℹ 1 more variable: V <dbl>
attach(dt)
#analisis deskriptif
summary(dt)
## Provinsi Y X1 X2
## Length:34 Min. : 1.59 Min. :43.28 Min. :67.60
## Class :character 1st Qu.:14.61 1st Qu.:47.76 1st Qu.:71.00
## Mode :character Median :19.59 Median :52.58 Median :72.42
## Mean :18.61 Mean :53.27 Mean :72.39
## 3rd Qu.:21.49 3rd Qu.:56.05 3rd Qu.:73.85
## Max. :33.33 Max. :69.62 Max. :76.93
## X3 X4 X5 X6
## Min. :0.1250 Min. :28.45 Min. :62.93 Min. :24.02
## 1st Qu.:0.2200 1st Qu.:31.45 1st Qu.:75.61 1st Qu.:30.06
## Median :0.2925 Median :38.24 Median :78.78 Median :34.63
## Mean :0.2718 Mean :39.50 Mean :77.95 Mean :33.53
## 3rd Qu.:0.3187 3rd Qu.:45.90 3rd Qu.:80.91 3rd Qu.:36.62
## Max. :0.3720 Max. :64.51 Max. :85.62 Max. :43.93
## X7 X8 X9 U
## Min. :23.20 Min. :34.91 Min. : 2.010 Min. : 96.75
## 1st Qu.:29.27 1st Qu.:47.49 1st Qu.: 4.420 1st Qu.:106.16
## Median :32.73 Median :50.98 Median : 5.100 Median :112.81
## Mean :33.12 Mean :49.82 Mean : 5.756 Mean :113.69
## 3rd Qu.:37.00 3rd Qu.:53.03 3rd Qu.: 5.340 3rd Qu.:120.80
## Max. :46.09 Max. :60.10 Max. :22.940 Max. :141.35
## V
## Min. :-8.6574
## 1st Qu.:-5.9096
## Median :-2.9684
## Mean :-2.7405
## 3rd Qu.: 0.4313
## Max. : 4.6951
stdv <- c(sd(dt$X1),sd(dt$X2), sd(dt$X3), sd(dt$X4), sd(dt$X5), sd(dt$X6), sd(dt$X7), sd(dt$X8),sd(dt$X9))
stdv
## [1] 6.75904910 2.43229285 0.06777103 8.88113919 5.43270229 4.52947983 5.65114980
## [8] 5.20825343 3.70351691
#Regresi OLS
library(MASS)
regols<-lm(formula=Y~X1+X2+X3+X4+X5+X6+X7+X8+X9, data=dt)
regols
##
## Call:
## lm(formula = Y ~ X1 + X2 + X3 + X4 + X5 + X6 + X7 + X8 + X9,
## data = dt)
##
## Coefficients:
## (Intercept) X1 X2 X3 X4 X5
## -78.690812 -0.355268 0.883846 46.969398 -0.006726 0.030332
## X6 X7 X8 X9
## 0.698648 0.454253 -0.079448 0.499061
F= a;k;n-k =0,1;9;25=1,89
#pengujian signifikansi parameter OLS #pengujian serentak (Uji F) melihat signifikansi seluruh model
summary(regols)
##
## Call:
## lm(formula = Y ~ X1 + X2 + X3 + X4 + X5 + X6 + X7 + X8 + X9,
## data = dt)
##
## Residuals:
## Min 1Q Median 3Q Max
## -12.7444 -2.5029 0.5354 2.7229 8.5691
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -78.690812 48.434030 -1.625 0.1173
## X1 -0.355268 0.230638 -1.540 0.1366
## X2 0.883846 0.705468 1.253 0.2223
## X3 46.969398 27.046646 1.737 0.0953 .
## X4 -0.006726 0.205704 -0.033 0.9742
## X5 0.030332 0.326297 0.093 0.9267
## X6 0.698648 0.337124 2.072 0.0491 *
## X7 0.454253 0.199861 2.273 0.0323 *
## X8 -0.079448 0.215048 -0.369 0.7150
## X9 0.499061 0.322301 1.548 0.1346
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 5.718 on 24 degrees of freedom
## Multiple R-squared: 0.4792, Adjusted R-squared: 0.2839
## F-statistic: 2.454 on 9 and 24 DF, p-value: 0.03828
#Confident interval #uji parsial (uji T)
confint.lm(regols, level=0.90)
## 5 % 95 %
## (Intercept) -161.55572623 4.17410181
## X1 -0.74986150 0.03932634
## X2 -0.32312538 2.09081827
## X3 0.69577489 93.24302044
## X4 -0.35866143 0.34521024
## X5 -0.52792410 0.58858784
## X6 0.12186880 1.27542641
## X7 0.11231435 0.79619133
## X8 -0.44737057 0.28847407
## X9 -0.05235741 1.05047892
prediksi<-predict(regols)
prediksi
## 1 2 3 4 5 6 7 8
## 17.012117 16.671240 20.435811 15.334968 18.110869 22.404267 18.149447 26.965097
## 9 10 11 12 13 14 15 16
## 20.034294 20.598609 17.986924 20.077303 19.370761 24.760935 18.127358 16.211014
## 17 18 19 20 21 22 23 24
## 14.143728 11.964551 15.286530 16.501269 29.176899 14.334408 15.149734 9.917807
## 25 26 27 28 29 30 31 32
## 15.278149 15.582947 18.092843 21.891024 26.502581 20.445446 29.108524 16.282795
## 33 34
## 19.654445 11.305303
#pengujian asumsi klasik regresi ols dan efek spasial #uji heterogenitas spasial (heterokedastisitas) untuk melihat keragaman data spasial
library(skedastic)
## Warning: package 'skedastic' was built under R version 4.3.3
## Registered S3 methods overwritten by 'registry':
## method from
## print.registry_field proxy
## print.registry_entry proxy
#Uji breush pagan
breusch_pagan(regols, auxdesign = NA, koenker = TRUE, statonly = FALSE)
## # A tibble: 1 × 5
## statistic p.value parameter method alternative
## <dbl> <dbl> <dbl> <chr> <chr>
## 1 10.5 0.308 9 Koenker (studentised) greater
#Uji glejser
glejser(regols, auxdesign = NA, sigmaest = c("main", "auxiliary"), statonly = FALSE)
## # A tibble: 1 × 4
## statistic p.value parameter alternative
## <dbl> <dbl> <dbl> <chr>
## 1 16.9 0.0496 9 greater
#pengujian indepennden autokorelasi
library(lmtest)
dwtest(lm(regols$residuals~X1+X2+X3+X4+X5+X6+X7+X8+X9, data = dt))
##
## Durbin-Watson test
##
## data: lm(regols$residuals ~ X1 + X2 + X3 + X4 + X5 + X6 + X7 + X8 + X9, data = dt)
## DW = 2.3748, p-value = 0.8495
## alternative hypothesis: true autocorrelation is greater than 0
#uji normalitas residual
resid<-abs(regols$residuals)
res=regols$residual
ks.test(res,"pnorm",mean(res),sd(res),alternative=c("two.sided"))
##
## Exact one-sample Kolmogorov-Smirnov test
##
## data: res
## D = 0.12762, p-value = 0.5924
## alternative hypothesis: two-sided
##GWR #mencari jarak euclidean GWR
V=dt[12]
U=dt[13]
V<-as.matrix(V)
U<-as.matrix(U)
j<-nrow(V)
i<-nrow(U)
jarak<-matrix(0,34,34)
for (i in 1:34) {
for (j in 1:34) {
jarak[i,j]<-sqrt((U[i,]-U[j,])**2+(V[i,]-V[j,])**2)
}
}
jarak
## [,1] [,2] [,3] [,4] [,5] [,6] [,7]
## [1,] 0.000000 22.502844 14.4911442 10.120324 18.4808034 14.8602910 26.6329387
## [2,] 22.502844 0.000000 9.2329152 13.613261 4.7578770 8.5174401 11.9316916
## [3,] 14.491144 9.232915 0.0000000 4.614365 4.5214668 0.8060392 18.3588459
## [4,] 10.120324 13.613261 4.6143648 0.000000 9.0411577 5.1824099 21.2433073
## [5,] 18.480803 4.757877 4.5214668 9.041158 0.0000000 3.8627286 15.1896689
## [6,] 14.860291 8.517440 0.8060392 5.182410 3.8627286 0.0000000 17.5611987
## [7,] 26.632939 11.931692 18.3588459 21.243307 15.1896689 17.5611987 0.0000000
## [8,] 9.320244 13.306467 5.3856831 2.567712 9.1605615 5.6210687 19.5625604
## [9,] 16.066925 7.527513 1.7449809 6.334432 2.7878838 1.2066431 17.1776549
## [10,] 17.878631 5.092574 4.1437911 8.565249 0.6880569 3.4267404 15.0346883
## [11,] 19.736044 2.964780 6.2769796 10.656685 1.8923744 5.5537418 13.5024866
## [12,] 10.727680 12.232961 6.9050338 6.097354 9.0891058 6.6901507 16.4437620
## [13,] 20.104028 5.251401 9.7969766 13.041805 6.8094972 8.9951516 8.5814651
## [14,] 17.813380 6.875004 8.7107599 11.320230 6.8234391 7.9514399 9.9269869
## [15,] 20.104348 8.977875 12.4683381 14.806370 10.3060869 11.7126068 6.6373821
## [16,] 19.360059 11.453053 13.7621826 15.396322 12.2669861 13.0658107 7.4574915
## [17,] 12.215400 10.305356 3.6840621 4.310127 6.4035807 3.4912837 16.9377116
## [18,] 11.418092 14.115249 10.5581492 9.720260 11.9553173 10.2369450 15.2970199
## [19,] 12.672098 10.397364 1.9606612 3.237893 5.9242449 2.1893398 18.3726116
## [20,] 34.325302 15.894455 24.2886601 27.890020 20.3000150 23.4882422 8.0343300
## [21,] 31.216097 16.123153 23.1616885 26.105007 19.8024377 22.3602150 4.8618071
## [22,] 24.556785 2.291094 11.5189395 15.863705 7.0485546 10.7963533 10.8170981
## [23,] 27.753148 5.995797 15.1832262 19.437172 10.7487887 14.4428523 9.4110120
## [24,] 45.641868 26.465187 35.3105092 39.105268 31.1075895 34.5221593 19.1154293
## [25,] 36.921263 19.391966 27.5806425 31.011417 23.7085576 26.7762042 10.2910626
## [26,] 6.629619 15.928134 7.9914887 4.123567 11.8525877 8.2876047 21.3514059
## [27,] 23.713108 6.881213 13.6412383 16.997810 10.1589567 12.8353256 5.1092705
## [28,] 24.684812 6.757224 14.1767540 17.713724 10.4602865 13.3719008 5.2198636
## [29,] 25.444465 9.387453 16.1663887 19.329809 12.7820415 15.3621902 2.5477021
## [30,] 26.918163 8.232089 16.2684578 19.916953 12.3629782 15.4673177 4.7707250
## [31,] 27.528199 12.620773 19.2413950 22.159030 16.0074527 18.4421375 0.9218075
## [32,] 6.778454 16.187304 7.7338217 3.384383 11.8889803 8.1521309 22.2937409
## [33,] 10.750376 12.253535 3.7611968 1.720065 7.8545872 4.1158399 19.5282607
## [34,] 3.804102 18.735804 10.7287788 6.502436 14.6767183 11.0719585 23.5641529
## [,8] [,9] [,10] [,11] [,12] [,13] [,14]
## [1,] 9.320244 16.066925 17.8786313 19.736044 10.727680 20.104028 17.813380
## [2,] 13.306467 7.527513 5.0925741 2.964780 12.232961 5.251401 6.875004
## [3,] 5.385683 1.744981 4.1437911 6.276980 6.905034 9.796977 8.710760
## [4,] 2.567712 6.334432 8.5652485 10.656685 6.097354 13.041805 11.320230
## [5,] 9.160561 2.787884 0.6880569 1.892374 9.089106 6.809497 6.823439
## [6,] 5.621069 1.206643 3.4267404 5.553742 6.690151 8.995152 7.951440
## [7,] 19.562560 17.177655 15.0346883 13.502487 16.443762 8.581465 9.926987
## [8,] 0.000000 6.818232 8.5618098 10.464810 3.654812 11.764423 9.769495
## [9,] 6.818232 0.000000 2.4721022 4.591146 7.641540 8.600722 7.868009
## [10,] 8.561810 2.472102 0.0000000 2.133189 8.404277 6.551767 6.358181
## [11,] 10.464810 4.591146 2.1331888 0.000000 9.790727 5.386854 5.965290
## [12,] 3.654812 7.641540 8.4042770 9.790727 0.000000 9.376803 7.105127
## [13,] 11.764423 8.600722 6.5517672 5.386854 9.376803 0.000000 2.367845
## [14,] 9.769495 7.868009 6.3581814 5.965290 7.105127 2.367845 0.000000
## [15,] 12.985291 11.609549 9.9276348 9.092953 9.806440 3.804734 3.761998
## [16,] 13.281354 13.168362 11.8048674 11.270178 9.779047 6.212108 5.447614
## [17,] 3.045253 4.519956 5.7563010 7.523749 3.223021 8.850158 7.022165
## [18,] 7.168349 11.046736 11.2749587 12.190291 3.790672 10.026460 7.688753
## [19,] 3.451194 3.395538 5.3968555 7.452252 5.178403 9.985146 8.478622
## [20,] 26.582074 22.804151 20.3840218 18.415359 23.823697 14.862230 16.835071
## [21,] 24.403872 21.923584 19.7040371 18.038153 21.223825 13.365083 14.788513
## [22,] 15.447433 9.817817 7.3759289 5.243572 14.102923 5.935863 8.027193
## [23,] 18.834377 13.501663 11.0423464 8.911795 17.108918 8.034641 10.387837
## [24,] 37.886952 33.742219 31.2799604 29.217823 35.165003 26.133851 28.162316
## [25,] 29.562866 26.146988 23.7570788 21.835032 26.623410 17.976978 19.795375
## [26,] 2.693908 9.490700 11.2490297 13.123021 4.909760 13.992781 11.841362
## [27,] 15.667630 12.318380 10.0603194 8.421739 13.048749 3.956133 5.964145
## [28,] 16.489945 12.772156 10.4321163 8.648470 13.989443 4.725550 6.884759
## [29,] 17.833407 14.894426 12.6704536 11.047920 14.954613 6.382226 8.067184
## [30,] 18.733763 14.801850 12.4041082 10.498955 16.233436 6.970727 9.130833
## [31,] 20.484152 18.039396 15.8701293 14.294952 17.362483 9.452842 10.840783
## [32,] 2.944628 9.355019 11.3288006 13.305045 5.939220 14.673593 12.617529
## [33,] 1.735663 5.321672 7.3104048 9.331075 4.658195 11.371621 9.608593
## [34,] 5.516158 12.278082 14.0755932 15.945841 7.255364 16.577958 14.348718
## [,15] [,16] [,17] [,18] [,19] [,20] [,21]
## [1,] 20.104348 19.360059 12.215400 11.418092 12.672098 34.325302 31.216097
## [2,] 8.977875 11.453053 10.305356 14.115249 10.397364 15.894455 16.123153
## [3,] 12.468338 13.762183 3.684062 10.558149 1.960661 24.288660 23.161689
## [4,] 14.806370 15.396322 4.310127 9.720260 3.237893 27.890020 26.105007
## [5,] 10.306087 12.266986 6.403581 11.955317 5.924245 20.300015 19.802438
## [6,] 11.712607 13.065811 3.491284 10.236945 2.189340 23.488242 22.360215
## [7,] 6.637382 7.457491 16.937712 15.297020 18.372612 8.034330 4.861807
## [8,] 12.985291 13.281354 3.045253 7.168349 3.451194 26.582074 24.403872
## [9,] 11.609549 13.168362 4.519956 11.046736 3.395538 22.804151 21.923584
## [10,] 9.927635 11.804867 5.756301 11.274959 5.396856 20.384022 19.704037
## [11,] 9.092953 11.270178 7.523749 12.190291 7.452252 18.415359 18.038153
## [12,] 9.806440 9.779047 3.223021 3.790672 5.178403 23.823697 21.223825
## [13,] 3.804734 6.212108 8.850158 10.026460 9.985146 14.862230 13.365083
## [14,] 3.761998 5.447614 7.022165 7.688753 8.478622 16.835071 14.788513
## [15,] 0.000000 2.562468 10.503951 8.950331 12.135025 14.236100 11.436071
## [16,] 2.562468 0.000000 11.224066 7.946572 13.089569 15.451708 11.862863
## [17,] 10.503951 11.224066 0.000000 6.899982 2.090963 23.709904 21.798922
## [18,] 8.950331 7.946572 6.899982 0.000000 8.933535 23.145569 19.808753
## [19,] 12.135025 13.089569 2.090963 8.933535 0.000000 24.773663 23.225410
## [20,] 14.236100 15.451708 23.709904 23.145569 24.773663 0.000000 5.346977
## [21,] 11.436071 11.862863 21.798922 19.808753 23.225410 5.346977 0.000000
## [22,] 9.239763 11.800118 12.418531 15.611222 12.636530 13.882997 14.617495
## [23,] 10.309345 12.766570 15.789140 18.060719 16.199671 10.561974 12.243553
## [24,] 25.538184 26.565900 34.980237 34.391263 35.943071 11.341307 15.053999
## [25,] 16.859886 17.691581 26.771020 25.583013 27.954267 3.577212 6.102844
## [26,] 14.714605 14.601595 5.622814 7.400129 6.101728 28.656915 26.133191
## [27,] 4.399378 6.722656 12.791907 13.002763 13.931168 10.920317 9.646401
## [28,] 5.508025 7.805060 13.565228 14.069713 14.594395 10.180320 9.425405
## [29,] 5.398027 7.034470 15.062196 14.347860 16.341093 8.885632 7.035328
## [30,] 7.420130 9.471848 15.796523 16.197125 16.772899 8.022045 8.025922
## [31,] 7.556099 8.302820 17.854518 16.176685 19.278072 7.279853 3.948835
## [32,] 15.671629 15.711111 5.985033 8.710475 5.983701 29.451441 27.107449
## [33,] 13.086622 13.708695 2.591555 8.406037 1.939786 26.230999 24.389697
## [34,] 16.947793 16.524070 8.434006 8.790428 8.882630 31.064998 28.268914
## [,22] [,23] [,24] [,25] [,26] [,27] [,28]
## [1,] 24.556785 27.753148 45.641868 36.921263 6.629619 23.713108 24.684812
## [2,] 2.291094 5.995797 26.465187 19.391966 15.928134 6.881213 6.757224
## [3,] 11.518940 15.183226 35.310509 27.580642 7.991489 13.641238 14.176754
## [4,] 15.863705 19.437172 39.105268 31.011417 4.123567 16.997810 17.713724
## [5,] 7.048555 10.748789 31.107590 23.708558 11.852588 10.158957 10.460286
## [6,] 10.796353 14.442852 34.522159 26.776204 8.287605 12.835326 13.371901
## [7,] 10.817098 9.411012 19.115429 10.291063 21.351406 5.109271 5.219864
## [8,] 15.447433 18.834377 37.886952 29.562866 2.693908 15.667630 16.489945
## [9,] 9.817817 13.501663 33.742219 26.146988 9.490700 12.318380 12.772156
## [10,] 7.375929 11.042346 31.279960 23.757079 11.249030 10.060319 10.432116
## [11,] 5.243572 8.911795 29.217823 21.835032 13.123021 8.421739 8.648470
## [12,] 14.102923 17.108918 35.165003 26.623410 4.909760 13.048749 13.989443
## [13,] 5.935863 8.034641 26.133851 17.976978 13.992781 3.956133 4.725550
## [14,] 8.027193 10.387837 28.162316 19.795375 11.841362 5.964145 6.884759
## [15,] 9.239763 10.309345 25.538184 16.859886 14.714605 4.399378 5.508025
## [16,] 11.800118 12.766570 26.565900 17.691581 14.601595 6.722656 7.805060
## [17,] 12.418531 15.789140 34.980237 26.771020 5.622814 12.791907 13.565228
## [18,] 15.611222 18.060719 34.391263 25.583013 7.400129 13.002763 14.069713
## [19,] 12.636530 16.199671 35.943071 27.954267 6.101728 13.931168 14.594395
## [20,] 13.882997 10.561974 11.341307 3.577212 28.656915 10.920317 10.180320
## [21,] 14.617495 12.243553 15.053999 6.102844 26.133191 9.646401 9.425405
## [22,] 0.000000 3.717726 24.260105 17.423805 18.030787 6.102510 5.627278
## [23,] 3.717726 0.000000 20.592830 14.138541 21.340358 6.099697 5.109568
## [24,] 24.260105 20.592830 0.000000 8.961039 39.993667 22.220960 21.415142
## [25,] 17.423805 14.138541 8.961039 0.000000 31.510047 14.023954 13.405182
## [26,] 18.030787 21.340358 39.993667 31.510047 0.000000 17.803880 18.691979
## [27,] 6.102510 6.099697 22.220960 14.023954 17.803880 0.000000 1.109322
## [28,] 5.627278 5.109568 21.415142 13.405182 18.691979 1.109322 0.000000
## [29,] 8.297543 7.236630 20.221221 11.729474 19.813879 2.626684 2.679106
## [30,] 6.594455 4.643484 19.192018 11.353051 20.943447 3.217215 2.251468
## [31,] 11.393452 9.723249 18.263674 9.406359 22.270634 5.876059 5.868700
## [32,] 18.354930 21.770130 40.771466 32.380200 1.374777 18.551792 19.396452
## [33,] 14.466329 17.975814 37.470873 29.327457 4.233860 15.325052 16.063454
## [34,] 20.817913 24.078554 42.405220 33.806270 2.827154 20.302063 21.232020
## [,29] [,30] [,31] [,32] [,33] [,34]
## [1,] 25.444465 26.918163 27.5281987 6.778454 10.750376 3.804102
## [2,] 9.387453 8.232089 12.6207729 16.187304 12.253535 18.735804
## [3,] 16.166389 16.268458 19.2413950 7.733822 3.761197 10.728779
## [4,] 19.329809 19.916953 22.1590297 3.384383 1.720065 6.502436
## [5,] 12.782042 12.362978 16.0074527 11.888980 7.854587 14.676718
## [6,] 15.362190 15.467318 18.4421375 8.152131 4.115840 11.071959
## [7,] 2.547702 4.770725 0.9218075 22.293741 19.528261 23.564153
## [8,] 17.833407 18.733763 20.4841516 2.944628 1.735663 5.516158
## [9,] 14.894426 14.801850 18.0393958 9.355019 5.321672 12.278082
## [10,] 12.670454 12.404108 15.8701293 11.328801 7.310405 14.075593
## [11,] 11.047920 10.498955 14.2949518 13.305045 9.331075 15.945841
## [12,] 14.954613 16.233436 17.3624827 5.939220 4.658195 7.255364
## [13,] 6.382226 6.970727 9.4528419 14.673593 11.371621 16.577958
## [14,] 8.067184 9.130833 10.8407825 12.617529 9.608593 14.348718
## [15,] 5.398027 7.420130 7.5560988 15.671629 13.086622 16.947793
## [16,] 7.034470 9.471848 8.3028197 15.711111 13.708695 16.524070
## [17,] 15.062196 15.796523 17.8545175 5.985033 2.591555 8.434006
## [18,] 14.347860 16.197125 16.1766851 8.710475 8.406037 8.790428
## [19,] 16.341093 16.772899 19.2780718 5.983701 1.939786 8.882630
## [20,] 8.885632 8.022045 7.2798532 29.451441 26.230999 31.064998
## [21,] 7.035328 8.025922 3.9488350 27.107449 24.389697 28.268914
## [22,] 8.297543 6.594455 11.3934523 18.354930 14.466329 20.817913
## [23,] 7.236630 4.643484 9.7232491 21.770130 17.975814 24.078554
## [24,] 20.221221 19.192018 18.2636742 40.771466 37.470873 42.405220
## [25,] 11.729474 11.353051 9.4063587 32.380200 29.327457 33.806270
## [26,] 19.813879 20.943447 22.2706336 1.374777 4.233860 2.827154
## [27,] 2.626684 3.217215 5.8760589 18.551792 15.325052 20.302063
## [28,] 2.679106 2.251468 5.8686996 19.396452 16.063454 21.232020
## [29,] 0.000000 2.811053 3.2587776 20.657143 17.632740 22.185638
## [30,] 2.811053 0.000000 5.0980906 21.644106 18.278855 23.479470
## [31,] 3.258778 5.098091 0.0000000 23.215136 20.444652 24.475337
## [32,] 20.657143 21.644106 23.2151355 0.000000 4.043916 3.118894
## [33,] 17.632740 18.278855 20.4446520 4.043916 0.000000 6.973361
## [34,] 22.185638 23.479470 24.4753369 3.118894 6.973361 0.000000
#fungsi pembobot kernel #fungsi kernel fixed (satu) ##fixed kernel gaussian
fixgauss=gwr.sel(Y~X1+X2+X3+X4+X5+X6+X7+X8+X9,data = dt,adapt=FALSE,coords=cbind(dt$U,dt$V),gweight=gwr.Gauss)
## Bandwidth: 17.81066 CV score: 1512.909
## Bandwidth: 28.78949 CV score: 1502.42
## Bandwidth: 35.57477 CV score: 1500.517
## Bandwidth: 35.87295 CV score: 1500.459
## Bandwidth: 39.95259 CV score: 1499.81
## Bandwidth: 42.47395 CV score: 1499.507
## Bandwidth: 44.03224 CV score: 1499.346
## Bandwidth: 44.99531 CV score: 1499.256
## Bandwidth: 45.59052 CV score: 1499.204
## Bandwidth: 45.95838 CV score: 1499.172
## Bandwidth: 46.18573 CV score: 1499.153
## Bandwidth: 46.32624 CV score: 1499.141
## Bandwidth: 46.41308 CV score: 1499.134
## Bandwidth: 46.46675 CV score: 1499.13
## Bandwidth: 46.49992 CV score: 1499.127
## Bandwidth: 46.52042 CV score: 1499.125
## Bandwidth: 46.53309 CV score: 1499.124
## Bandwidth: 46.54092 CV score: 1499.124
## Bandwidth: 46.54576 CV score: 1499.123
## Bandwidth: 46.54875 CV score: 1499.123
## Bandwidth: 46.5506 CV score: 1499.123
## Bandwidth: 46.55175 CV score: 1499.123
## Bandwidth: 46.55245 CV score: 1499.123
## Bandwidth: 46.55289 CV score: 1499.123
## Bandwidth: 46.55316 CV score: 1499.123
## Bandwidth: 46.55332 CV score: 1499.123
## Bandwidth: 46.55343 CV score: 1499.123
## Bandwidth: 46.55349 CV score: 1499.123
## Bandwidth: 46.55353 CV score: 1499.123
## Bandwidth: 46.55353 CV score: 1499.123
## Warning in gwr.sel(Y ~ X1 + X2 + X3 + X4 + X5 + X6 + X7 + X8 + X9, data = dt, :
## Bandwidth converged to upper bound:46.5535939962253
gwr.fixgauss=gwr(Y~X1+X2+X3+X4+X5+X6+X7+X8+X9,data = dt,bandwidth = fixgauss,coords = cbind(dt$U,dt$V),hatmatrix = TRUE,gweight = gwr.Gauss)
gwr.fixgauss
## Call:
## gwr(formula = Y ~ X1 + X2 + X3 + X4 + X5 + X6 + X7 + X8 + X9,
## data = dt, coords = cbind(dt$U, dt$V), bandwidth = fixgauss,
## gweight = gwr.Gauss, hatmatrix = TRUE)
## Kernel function: gwr.Gauss
## Fixed bandwidth: 46.55353
## Summary of GWR coefficient estimates at data points:
## Min. 1st Qu. Median 3rd Qu. Max.
## X.Intercept. -80.9565895 -80.2495585 -79.5745884 -78.8208449 -76.4951375
## X1 -0.3748687 -0.3678794 -0.3657101 -0.3628304 -0.3577212
## X2 0.8514134 0.8802183 0.8908698 0.9005885 0.9102256
## X3 45.6927992 45.8635848 46.1262317 46.3681656 46.7869549
## X4 -0.0219146 -0.0191788 -0.0167561 -0.0139609 -0.0065683
## X5 0.0248618 0.0372090 0.0418139 0.0453648 0.0496980
## X6 0.6965678 0.7036128 0.7068687 0.7083427 0.7127779
## X7 0.4350619 0.4478114 0.4561445 0.4660880 0.4894843
## X8 -0.0748276 -0.0745516 -0.0739661 -0.0735256 -0.0728425
## X9 0.4808922 0.5030303 0.5112083 0.5192751 0.5317468
## Global
## X.Intercept. -78.6908
## X1 -0.3553
## X2 0.8838
## X3 46.9694
## X4 -0.0067
## X5 0.0303
## X6 0.6986
## X7 0.4543
## X8 -0.0794
## X9 0.4991
## Number of data points: 34
## Effective number of parameters (residual: 2traceS - traceS'S): 10.68946
## Effective degrees of freedom (residual: 2traceS - traceS'S): 23.31054
## Sigma (residual: 2traceS - traceS'S): 5.716141
## Effective number of parameters (model: traceS): 10.35658
## Effective degrees of freedom (model: traceS): 23.64342
## Sigma (model: traceS): 5.675759
## Sigma (ML): 4.733034
## AICc (GWR p. 61, eq 2.33; p. 96, eq. 4.21): 237.8788
## AIC (GWR p. 96, eq. 4.22): 212.5549
## Residual sum of squares: 761.6547
## Quasi-global R2: 0.4945012
names(gwr.fixgauss)
## [1] "SDF" "lhat" "lm" "results" "bandwidth" "adapt"
## [7] "hatmatrix" "gweight" "gTSS" "this.call" "fp.given" "timings"
BFC02.gwr.test(gwr.fixgauss)
##
## Brunsdon, Fotheringham & Charlton (2002, pp. 91-2) ANOVA
##
## data: gwr.fixgauss
## F = 1.0302, df1 = 24.000, df2 = 23.311, p-value = 0.4723
## alternative hypothesis: greater
## sample estimates:
## SS OLS residuals SS GWR residuals
## 784.6649 761.6547
##Fixed kernel Bisquare
#bandwidth
fixbisquare=gwr.sel(Y~X1+X2+X3+X4+X5+X6+X7+X8+X9,data=dt,adapt
=FALSE,coords=cbind(dt$U,dt$V),gweight=gwr.bisquare)
## Bandwidth: 17.81066 CV score: NA
## Warning in optimize(gwr.cv.f, lower = beta1, upper = beta2, maximum = FALSE, :
## NA/Inf replaced by maximum positive value
## Bandwidth: 28.78949 CV score: 1512.782
## Bandwidth: 28.78944 CV score: 1512.783
## Bandwidth: 28.78953 CV score: 1512.782
## Bandwidth: 35.5748 CV score: 1520.399
## Bandwidth: 30.23247 CV score: 1505.639
## Bandwidth: 30.36345 CV score: 1505.563
## Bandwidth: 30.40275 CV score: 1505.556
## Bandwidth: 30.42439 CV score: 1505.554
## Bandwidth: 30.42578 CV score: 1505.554
## Bandwidth: 30.42591 CV score: 1505.554
## Bandwidth: 30.42595 CV score: 1505.554
## Bandwidth: 30.42587 CV score: 1505.554
## Bandwidth: 30.42591 CV score: 1505.554
#estimasi parameter
gwr.fixbisquare=gwr(Y~X1+X2+X3+X4+X5+X6+X7+X8+X9,data=dt,bandwidth=fixbisquare,coords=cbind(dt$U,dt$V),hatmatrix=TRUE,gweight=gwr.bisquare)
gwr.fixbisquare
## Call:
## gwr(formula = Y ~ X1 + X2 + X3 + X4 + X5 + X6 + X7 + X8 + X9,
## data = dt, coords = cbind(dt$U, dt$V), bandwidth = fixbisquare,
## gweight = gwr.bisquare, hatmatrix = TRUE)
## Kernel function: gwr.bisquare
## Fixed bandwidth: 30.42591
## Summary of GWR coefficient estimates at data points:
## Min. 1st Qu. Median 3rd Qu. Max. Global
## X.Intercept. -97.514770 -95.682537 -88.567039 -81.355573 -50.451920 -78.6908
## X1 -0.545677 -0.520235 -0.504786 -0.477606 -0.190034 -0.3553
## X2 0.754430 0.858315 0.891543 0.976328 1.534980 0.8838
## X3 -7.922638 33.738407 34.593887 36.650200 37.678140 46.9694
## X4 -0.172654 -0.129728 -0.116816 -0.108685 0.026920 -0.0067
## X5 -0.242636 0.091746 0.188607 0.252535 0.299402 0.0303
## X6 0.160005 0.727090 0.770271 0.797073 0.837672 0.6986
## X7 0.116528 0.338581 0.462065 0.570735 0.703635 0.4543
## X8 -0.154704 -0.018103 0.026403 0.053506 0.246078 -0.0794
## X9 0.440104 0.577994 0.688723 0.734435 1.528344 0.4991
## Number of data points: 34
## Effective number of parameters (residual: 2traceS - traceS'S): 16.18015
## Effective degrees of freedom (residual: 2traceS - traceS'S): 17.81985
## Sigma (residual: 2traceS - traceS'S): 5.524377
## Effective number of parameters (model: traceS): 14.21005
## Effective degrees of freedom (model: traceS): 19.78995
## Sigma (model: traceS): 5.242193
## Sigma (ML): 3.99941
## AICc (GWR p. 61, eq 2.33; p. 96, eq. 4.21): 248.8844
## AIC (GWR p. 96, eq. 4.22): 204.9559
## Residual sum of squares: 543.8394
## Quasi-global R2: 0.6390619
names(gwr.fixbisquare)
## [1] "SDF" "lhat" "lm" "results" "bandwidth" "adapt"
## [7] "hatmatrix" "gweight" "gTSS" "this.call" "fp.given" "timings"
BFC02.gwr.test(gwr.fixbisquare)
##
## Brunsdon, Fotheringham & Charlton (2002, pp. 91-2) ANOVA
##
## data: gwr.fixbisquare
## F = 1.4428, df1 = 24.00, df2 = 17.82, p-value = 0.2154
## alternative hypothesis: greater
## sample estimates:
## SS OLS residuals SS GWR residuals
## 784.6649 543.8394
##fixed kernel Tricube #estimasi parameter
fixtricube=gwr.sel(Y~X1+X2+X3+X4+X5+X6+X7+X8+X9,data = dt,adapt = FALSE,coords = cbind(dt$U,dt$V),gweight = gwr.tricube)
## Bandwidth: 17.81066 CV score: NA
## Warning in optimize(gwr.cv.f, lower = beta1, upper = beta2, maximum = FALSE, :
## NA/Inf replaced by maximum positive value
## Bandwidth: 28.78949 CV score: 1488.669
## Bandwidth: 28.78944 CV score: 1488.669
## Bandwidth: 28.78953 CV score: 1488.669
## Bandwidth: 35.5748 CV score: 1504.062
## Bandwidth: 30.86956 CV score: 1478.475
## Bandwidth: 30.74825 CV score: 1478.444
## Bandwidth: 30.76052 CV score: 1478.444
## Bandwidth: 30.7559 CV score: 1478.444
## Bandwidth: 30.75586 CV score: 1478.444
## Bandwidth: 30.75594 CV score: 1478.444
## Bandwidth: 30.7559 CV score: 1478.444
gwr.fixtricube=gwr(Y~X1+X2+X3+X4+X5+X6+X7+X8+X9,data = dt,bandwidth = fixtricube,coords = cbind(dt$U,dt$V),hatmatrix = TRUE,gweight = gwr.tricube)
gwr.fixtricube
## Call:
## gwr(formula = Y ~ X1 + X2 + X3 + X4 + X5 + X6 + X7 + X8 + X9,
## data = dt, coords = cbind(dt$U, dt$V), bandwidth = fixtricube,
## gweight = gwr.tricube, hatmatrix = TRUE)
## Kernel function: gwr.tricube
## Fixed bandwidth: 30.7559
## Summary of GWR coefficient estimates at data points:
## Min. 1st Qu. Median 3rd Qu. Max.
## X.Intercept. -102.717637 -99.595543 -85.003928 -78.353709 -52.167623
## X1 -0.542803 -0.522800 -0.496891 -0.478668 -0.067161
## X2 0.790104 0.836750 0.896391 1.006808 1.492972
## X3 -14.199208 33.749820 35.659422 37.243647 39.235395
## X4 -0.186182 -0.128268 -0.112264 -0.099804 0.064932
## X5 -0.223962 0.091224 0.191441 0.259477 0.298042
## X6 0.049868 0.742121 0.770317 0.795428 0.813551
## X7 0.110142 0.358822 0.455103 0.545814 0.732443
## X8 -0.150205 -0.018645 0.028104 0.066500 0.334051
## X9 0.431968 0.573650 0.689090 0.726681 1.633159
## Global
## X.Intercept. -78.6908
## X1 -0.3553
## X2 0.8838
## X3 46.9694
## X4 -0.0067
## X5 0.0303
## X6 0.6986
## X7 0.4543
## X8 -0.0794
## X9 0.4991
## Number of data points: 34
## Effective number of parameters (residual: 2traceS - traceS'S): 15.00143
## Effective degrees of freedom (residual: 2traceS - traceS'S): 18.99857
## Sigma (residual: 2traceS - traceS'S): 5.51417
## Effective number of parameters (model: traceS): 13.51718
## Effective degrees of freedom (model: traceS): 20.48282
## Sigma (model: traceS): 5.310626
## Sigma (ML): 4.121935
## AICc (GWR p. 61, eq 2.33; p. 96, eq. 4.21): 246.2078
## AIC (GWR p. 96, eq. 4.22): 206.3149
## Residual sum of squares: 577.6719
## Quasi-global R2: 0.6166078
names(gwr.fixtricube)
## [1] "SDF" "lhat" "lm" "results" "bandwidth" "adapt"
## [7] "hatmatrix" "gweight" "gTSS" "this.call" "fp.given" "timings"
BFC02.gwr.test(gwr.fixtricube)
##
## Brunsdon, Fotheringham & Charlton (2002, pp. 91-2) ANOVA
##
## data: gwr.fixtricube
## F = 1.3583, df1 = 24.000, df2 = 18.999, p-value = 0.2499
## alternative hypothesis: greater
## sample estimates:
## SS OLS residuals SS GWR residuals
## 784.6649 577.6719
#FUNGSI KERNEL ADAPTIVE (dua) ##fungsi kernel adaptive gaussian
#bandwidth
adaptgauss=gwr.sel(Y~X1+X2+X3+X4+X5+X6+X7+X8+X9,data=dt,adapt
=TRUE,coords=cbind(dt$U,dt$V),gweight=gwr.Gauss)
## Adaptive q: 0.381966 CV score: 1670.583
## Adaptive q: 0.618034 CV score: 1527.399
## Adaptive q: 0.763932 CV score: 1498.667
## Adaptive q: 0.7828047 CV score: 1496.744
## Adaptive q: 0.8657659 CV score: 1492.591
## Adaptive q: 0.8734982 CV score: 1492.486
## Adaptive q: 0.8864473 CV score: 1491.337
## Adaptive q: 0.9298205 CV score: 1486.65
## Adaptive q: 0.9566267 CV score: 1486.949
## Adaptive q: 0.9399434 CV score: 1486.734
## Adaptive q: 0.9132534 CV score: 1486.411
## Adaptive q: 0.9030144 CV score: 1487.776
## Adaptive q: 0.9195815 CV score: 1486.52
## Adaptive q: 0.9093425 CV score: 1486.741
## Adaptive q: 0.9156705 CV score: 1486.455
## Adaptive q: 0.9117596 CV score: 1486.383
## Adaptive q: 0.9108363 CV score: 1486.517
## Adaptive q: 0.9123302 CV score: 1486.393
## Adaptive q: 0.9114069 CV score: 1486.434
## Adaptive q: 0.9119775 CV score: 1486.386
## Adaptive q: 0.9116249 CV score: 1486.402
## Adaptive q: 0.9118428 CV score: 1486.384
## Adaptive q: 0.9117189 CV score: 1486.389
## Adaptive q: 0.9118003 CV score: 1486.383
## Adaptive q: 0.9118003 CV score: 1486.383
#estimasi parameter
gwr.adaptgauss=gwr(Y~X1+X2+X3+X4+X5+X6+X7+X8+X9,data=dt,adapt=adaptgauss,
coords=cbind(dt$U,dt$V),hatmatrix=TRUE,gweight=gwr.Gauss)
gwr.adaptgauss
## Call:
## gwr(formula = Y ~ X1 + X2 + X3 + X4 + X5 + X6 + X7 + X8 + X9,
## data = dt, coords = cbind(dt$U, dt$V), gweight = gwr.Gauss,
## adapt = adaptgauss, hatmatrix = TRUE)
## Kernel function: gwr.Gauss
## Adaptive quantile: 0.9118003 (about 31 of 34 data points)
## Summary of GWR coefficient estimates at data points:
## Min. 1st Qu. Median 3rd Qu. Max. Global
## X.Intercept. -85.392298 -84.589382 -84.050843 -80.122707 -75.630628 -78.6908
## X1 -0.447248 -0.425135 -0.402780 -0.389826 -0.361372 -0.3553
## X2 0.837440 0.874903 0.917716 0.938008 0.943219 0.8838
## X3 41.220909 42.089125 42.699219 43.705343 46.599611 46.9694
## X4 -0.077738 -0.062478 -0.053216 -0.042007 -0.006660 -0.0067
## X5 0.021998 0.064704 0.092216 0.106397 0.129697 0.0303
## X6 0.691893 0.714827 0.729350 0.750209 0.773977 0.6986
## X7 0.409058 0.419744 0.464445 0.511241 0.519609 0.4543
## X8 -0.071722 -0.058372 -0.051164 -0.043029 -0.022153 -0.0794
## X9 0.474865 0.523472 0.577833 0.581880 0.607300 0.4991
## Number of data points: 34
## Effective number of parameters (residual: 2traceS - traceS'S): 12.49439
## Effective degrees of freedom (residual: 2traceS - traceS'S): 21.50561
## Sigma (residual: 2traceS - traceS'S): 5.667285
## Effective number of parameters (model: traceS): 11.37384
## Effective degrees of freedom (model: traceS): 22.62616
## Sigma (model: traceS): 5.525168
## Sigma (ML): 4.507248
## AICc (GWR p. 61, eq 2.33; p. 96, eq. 4.21): 239.6684
## AIC (GWR p. 96, eq. 4.22): 210.2484
## Residual sum of squares: 690.7196
## Quasi-global R2: 0.5415797
names(gwr.adaptgauss)
## [1] "SDF" "lhat" "lm" "results" "bandwidth" "adapt"
## [7] "hatmatrix" "gweight" "gTSS" "this.call" "fp.given" "timings"
BFC02.gwr.test(gwr.adaptgauss)
##
## Brunsdon, Fotheringham & Charlton (2002, pp. 91-2) ANOVA
##
## data: gwr.adaptgauss
## F = 1.136, df1 = 24.000, df2 = 21.506, p-value = 0.3851
## alternative hypothesis: greater
## sample estimates:
## SS OLS residuals SS GWR residuals
## 784.6649 690.7196
##FUNGSI KERNEL ADAPTIVE BISQUARE
#bandwidth
adaptbisquare=gwr.sel(Y~X1+X2+X3+X4+X5+X6+X7+X8+X9, data=dt,adapt=TRUE,coords=cbind(dt$U,dt$V),gweight=gwr.bisquare)
## Adaptive q: 0.381966 CV score: 18819.46
## Adaptive q: 0.618034 CV score: 2820.519
## Adaptive q: 0.763932 CV score: 2484.289
## Adaptive q: 0.6977058 CV score: 2536.176
## Adaptive q: 0.7513377 CV score: 2497.511
## Adaptive q: 0.854102 CV score: 2347.745
## Adaptive q: 0.9098301 CV score: 2098.172
## Adaptive q: 0.9442719 CV score: 1959.776
## Adaptive q: 0.9655581 CV score: 1833.341
## Adaptive q: 0.9787138 CV score: 1719.675
## Adaptive q: 0.9868444 CV score: 1650.62
## Adaptive q: 0.9918694 CV score: 1618.631
## Adaptive q: 0.994975 CV score: 1602.15
## Adaptive q: 0.9968944 CV score: 1593.035
## Adaptive q: 0.9980806 CV score: 1587.772
## Adaptive q: 0.9988138 CV score: 1584.651
## Adaptive q: 0.9992669 CV score: 1582.771
## Adaptive q: 0.9995469 CV score: 1581.628
## Adaptive q: 0.99972 CV score: 1580.928
## Adaptive q: 0.9998269 CV score: 1580.498
## Adaptive q: 0.999893 CV score: 1580.233
## Adaptive q: 0.9999339 CV score: 1580.069
## Adaptive q: 0.9999339 CV score: 1580.069
## Warning in gwr.sel(Y ~ X1 + X2 + X3 + X4 + X5 + X6 + X7 + X8 + X9, data = dt, :
## Bandwidth converged to upper bound:1
#estimasi parameter
gwr.adaptbisquare=gwr(Y~X1+X2+X3+X4+X5+X6+X7+X8+X9,data=dt,adapt=adaptbisquare,coords=cbind(dt$U,dt$V),hatmatrix=TRUE,gweight=gwr.bisquare)
gwr.adaptbisquare
## Call:
## gwr(formula = Y ~ X1 + X2 + X3 + X4 + X5 + X6 + X7 + X8 + X9,
## data = dt, coords = cbind(dt$U, dt$V), gweight = gwr.bisquare,
## adapt = adaptbisquare, hatmatrix = TRUE)
## Kernel function: gwr.bisquare
## Adaptive quantile: 0.9999339 (about 33 of 34 data points)
## Summary of GWR coefficient estimates at data points:
## Min. 1st Qu. Median 3rd Qu. Max.
## X.Intercept. -97.1149567 -92.9212327 -92.1761749 -85.9838722 -62.6186198
## X1 -0.6509312 -0.5561572 -0.5028933 -0.4589013 -0.3990034
## X2 0.7854804 0.8627844 0.9082723 0.9569625 1.0316919
## X3 29.4286414 33.1342566 35.0872445 36.4720963 37.9588201
## X4 -0.2087662 -0.1554174 -0.1233001 -0.1055358 -0.0354919
## X5 -0.0398335 0.1400112 0.2134936 0.2531758 0.3199241
## X6 0.6802737 0.7286519 0.7699071 0.8204320 0.9278051
## X7 0.3359096 0.3797292 0.4591850 0.6507715 0.6759271
## X8 -0.0467145 -0.0041127 0.0260731 0.0649211 0.1095509
## X9 0.4162402 0.6076615 0.7012915 0.7074956 0.7133849
## Global
## X.Intercept. -78.6908
## X1 -0.3553
## X2 0.8838
## X3 46.9694
## X4 -0.0067
## X5 0.0303
## X6 0.6986
## X7 0.4543
## X8 -0.0794
## X9 0.4991
## Number of data points: 34
## Effective number of parameters (residual: 2traceS - traceS'S): 15.62996
## Effective degrees of freedom (residual: 2traceS - traceS'S): 18.37004
## Sigma (residual: 2traceS - traceS'S): 5.526557
## Effective number of parameters (model: traceS): 13.67229
## Effective degrees of freedom (model: traceS): 20.32771
## Sigma (model: traceS): 5.253703
## Sigma (ML): 4.062284
## AICc (GWR p. 61, eq 2.33; p. 96, eq. 4.21): 246.2441
## AIC (GWR p. 96, eq. 4.22): 205.4788
## Residual sum of squares: 561.0731
## Quasi-global R2: 0.6276242
names(gwr.adaptbisquare)
## [1] "SDF" "lhat" "lm" "results" "bandwidth" "adapt"
## [7] "hatmatrix" "gweight" "gTSS" "this.call" "fp.given" "timings"
BFC02.gwr.test(gwr.adaptbisquare)
##
## Brunsdon, Fotheringham & Charlton (2002, pp. 91-2) ANOVA
##
## data: gwr.adaptbisquare
## F = 1.3985, df1 = 24.00, df2 = 18.37, p-value = 0.2329
## alternative hypothesis: greater
## sample estimates:
## SS OLS residuals SS GWR residuals
## 784.6649 561.0731
X1+X2+X3+X4+X6+X7+X5+X9=0.885 ##FUNGSI KERNEL ADAPTIVE TRICUBE
#bandwidth
adapttricube=gwr.sel(Y~X1+X2+X3+X4+X5+X6+X7+X8+X9,data=dt,adapt=TRUE,coords=cbind(dt$U,dt$V),gweight=gwr.tricube)
## Adaptive q: 0.381966 CV score: 22520.64
## Adaptive q: 0.618034 CV score: 2989.375
## Adaptive q: 0.763932 CV score: 2531.609
## Adaptive q: 0.6985111 CV score: 2585.484
## Adaptive q: 0.7455416 CV score: 2540.605
## Adaptive q: 0.7891416 CV score: 2547.962
## Adaptive q: 0.7641088 CV score: 2531.508
## Adaptive q: 0.7736705 CV score: 2537.884
## Adaptive q: 0.7662664 CV score: 2532.364
## Adaptive q: 0.764709 CV score: 2531.168
## Adaptive q: 0.7653038 CV score: 2531.632
## Adaptive q: 0.7644797 CV score: 2531.295
## Adaptive q: 0.7649362 CV score: 2531.347
## Adaptive q: 0.7646682 CV score: 2531.187
## Adaptive q: 0.7647957 CV score: 2531.237
## Adaptive q: 0.7647497 CV score: 2531.2
## Adaptive q: 0.764709 CV score: 2531.168
#estimasi parameter
gwr.adapttricube=gwr(Y~X1+X2+X3+X4+X5+X6+X7+X8+X9,data=dt,adapt=adapttricube,coords=cbind(dt$U,dt$V),hatmatrix=TRUE,gweight=gwr.tricube)
gwr.adapttricube
## Call:
## gwr(formula = Y ~ X1 + X2 + X3 + X4 + X5 + X6 + X7 + X8 + X9,
## data = dt, coords = cbind(dt$U, dt$V), gweight = gwr.tricube,
## adapt = adapttricube, hatmatrix = TRUE)
## Kernel function: gwr.tricube
## Adaptive quantile: 0.764709 (about 26 of 34 data points)
## Summary of GWR coefficient estimates at data points:
## Min. 1st Qu. Median 3rd Qu. Max.
## X.Intercept. -185.563717 -125.622154 -64.877809 -49.457780 -39.547398
## X1 -0.942090 -0.772502 -0.642528 -0.506269 -0.423634
## X2 0.685626 1.024000 1.116870 1.316233 1.578010
## X3 -35.306797 -4.185411 8.721806 22.625720 77.242440
## X4 -0.744130 -0.371944 -0.283558 -0.214602 -0.046949
## X5 -0.761511 -0.080738 0.110986 0.306911 0.937421
## X6 0.416614 0.624612 0.769132 0.976651 1.321482
## X7 -0.131090 0.025942 0.637661 0.808623 1.097991
## X8 -0.191178 -0.058835 0.014883 0.063985 0.291089
## X9 -0.908432 0.486177 0.633369 3.687884 8.328752
## Global
## X.Intercept. -78.6908
## X1 -0.3553
## X2 0.8838
## X3 46.9694
## X4 -0.0067
## X5 0.0303
## X6 0.6986
## X7 0.4543
## X8 -0.0794
## X9 0.4991
## Number of data points: 34
## Effective number of parameters (residual: 2traceS - traceS'S): 23.81159
## Effective degrees of freedom (residual: 2traceS - traceS'S): 10.18841
## Sigma (residual: 2traceS - traceS'S): 4.796469
## Effective number of parameters (model: traceS): 21.33158
## Effective degrees of freedom (model: traceS): 12.66842
## Sigma (model: traceS): 4.301437
## Sigma (ML): 2.625641
## AICc (GWR p. 61, eq 2.33; p. 96, eq. 4.21): 304.4704
## AIC (GWR p. 96, eq. 4.22): 183.4615
## Residual sum of squares: 234.3956
## Quasi-global R2: 0.8444351
names(gwr.adapttricube)
## [1] "SDF" "lhat" "lm" "results" "bandwidth" "adapt"
## [7] "hatmatrix" "gweight" "gTSS" "this.call" "fp.given" "timings"
BFC02.gwr.test(gwr.adapttricube)
##
## Brunsdon, Fotheringham & Charlton (2002, pp. 91-2) ANOVA
##
## data: gwr.adapttricube
## F = 3.3476, df1 = 24.000, df2 = 10.188, p-value = 0.02442
## alternative hypothesis: greater
## sample estimates:
## SS OLS residuals SS GWR residuals
## 784.6649 234.3956
##Pemilihan fungsi kernel terbaik
library(tidyverse)
## Warning: package 'readr' was built under R version 4.3.3
## Warning: package 'dplyr' was built under R version 4.3.3
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
## ✔ forcats 1.0.0 ✔ stringr 1.5.0
## ✔ ggplot2 3.4.2 ✔ tibble 3.2.1
## ✔ lubridate 1.9.2 ✔ tidyr 1.3.0
## ✔ purrr 1.0.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ tidyr::expand() masks Matrix::expand()
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ✖ tidyr::pack() masks Matrix::pack()
## ✖ dplyr::recode() masks car::recode()
## ✖ dplyr::select() masks MASS::select()
## ✖ purrr::some() masks car::some()
## ✖ tidyr::unpack() masks Matrix::unpack()
## ✖ dplyr::where() masks ape::where()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
R1 <- (1 - (gwr.fixgauss$results$rss/gwr.fixgauss$gTSS))
R2 <- (1 - (gwr.fixbisquare$results$rss/gwr.fixbisquare$gTSS))
R3 <- (1 - (gwr.fixtricube$results$rss/gwr.fixtricube$gTSS))
R4 <- (1 - (gwr.adaptgauss$results$rss/gwr.adaptgauss$gTSS))
R5 <- (1 - (gwr.adaptbisquare$results$rss/gwr.adaptbisquare$gTSS))
R6 <- (1 - (gwr.adapttricube$results$rss/gwr.adapttricube$gTSS))
Kernel_Optimal <-data.frame("KERNEL" = c("fixgauss","fixbisquare","fixtricube","adaptgauss","adaptbisquare","adapttricube"),
"AIC" = c(gwr.fixgauss[["results"]][["AICh"]],
gwr.fixbisquare[["results"]][["AICh"]],
gwr.fixtricube[["results"]][["AICh"]],
gwr.adaptgauss[["results"]][["AICh"]],
gwr.adaptbisquare[["results"]][["AICh"]],
gwr.adapttricube[["results"]][["AICh"]]),
"R2" = c(R1,R2,R3,R4,R5,R6))
Kernel_Optimal
## KERNEL AIC R2
## 1 fixgauss 212.5549 0.4945012
## 2 fixbisquare 204.9559 0.6390619
## 3 fixtricube 206.3149 0.6166078
## 4 adaptgauss 210.2484 0.5415797
## 5 adaptbisquare 205.4788 0.6276242
## 6 adapttricube 183.4615 0.8444351
#Mencari bandwidth optimal (adaptive bisquare)
library(spgwr)
b <- gwr.sel(Y~X1+X2+X3+X4+X5+X6+X7+X8+X9,coords=cbind(dt$V,dt$U),data=dt, adapt=TRUE,gweight=gwr.tricube)
## Adaptive q: 0.381966 CV score: 22520.64
## Adaptive q: 0.618034 CV score: 2989.375
## Adaptive q: 0.763932 CV score: 2531.609
## Adaptive q: 0.6985111 CV score: 2585.484
## Adaptive q: 0.7455416 CV score: 2540.605
## Adaptive q: 0.7891416 CV score: 2547.962
## Adaptive q: 0.7641088 CV score: 2531.508
## Adaptive q: 0.7736705 CV score: 2537.884
## Adaptive q: 0.7662664 CV score: 2532.364
## Adaptive q: 0.764709 CV score: 2531.168
## Adaptive q: 0.7653038 CV score: 2531.632
## Adaptive q: 0.7644797 CV score: 2531.295
## Adaptive q: 0.7649362 CV score: 2531.347
## Adaptive q: 0.7646682 CV score: 2531.187
## Adaptive q: 0.7647957 CV score: 2531.237
## Adaptive q: 0.7647497 CV score: 2531.2
## Adaptive q: 0.764709 CV score: 2531.168
b
## [1] 0.764709
#mencari pembobot GWr setiap lokasi
h<-as.matrix(gwr.adapttricube$bandwidth)
i<-nrow(h)
W<-matrix(0,34,34)
for (i in 1:34) {
for (j in 1:34) {
W[i,j]<-exp(-(1/2)*(jarak[i,j]/h[i,])**2)
W[i,j]<-ifelse(jarak[i,j]<h[i,],W[i,j],0)
}
}
W
## [,1] [,2] [,3] [,4] [,5] [,6] [,7]
## [1,] 1.0000000 0.6763331 0.8502922 0.9239490 0.7681523 0.8432069 0.0000000
## [2,] 0.0000000 1.0000000 0.8074099 0.6280995 0.9447756 0.8335565 0.6995899
## [3,] 0.6341621 0.8311956 1.0000000 0.9548695 0.9566287 0.9985919 0.0000000
## [4,] 0.8719200 0.7803657 0.9719091 1.0000000 0.8963842 0.9646982 0.0000000
## [5,] 0.0000000 0.9330692 0.9393543 0.7786823 1.0000000 0.9553659 0.0000000
## [6,] 0.6065328 0.8485218 0.9985300 0.9410019 0.9667811 1.0000000 0.0000000
## [7,] 0.0000000 0.8098739 0.6069877 0.0000000 0.7105187 0.6333025 1.0000000
## [8,] 0.8723463 0.7570167 0.9554227 0.9896881 0.8764030 0.9515390 0.0000000
## [9,] 0.0000000 0.8786994 0.9930751 0.9124975 0.9824191 0.9966828 0.0000000
## [10,] 0.0000000 0.9224058 0.9479272 0.7957391 0.9985267 0.9640895 0.0000000
## [11,] 0.0000000 0.9754788 0.8946836 0.7255974 0.9899363 0.9165690 0.0000000
## [12,] 0.7731437 0.7156523 0.8988882 0.9202426 0.8313581 0.9047783 0.0000000
## [13,] 0.0000000 0.9221321 0.7541623 0.6065322 0.8725735 0.7883183 0.8053497
## [14,] 0.0000000 0.8315888 0.7437490 0.6065336 0.8338839 0.7813849 0.6807946
## [15,] 0.0000000 0.7903200 0.6351702 0.0000000 0.7333774 0.6699778 0.8793101
## [16,] 0.0000000 0.7073116 0.6065345 0.0000000 0.6721649 0.6371985 0.8634523
## [17,] 0.7197474 0.7913195 0.9705311 0.9598848 0.9135911 0.9734943 0.0000000
## [18,] 0.7568618 0.6532944 0.7880501 0.8171865 0.7368246 0.7993781 0.6065320
## [19,] 0.7364217 0.8138578 0.9927025 0.9802234 0.9353180 0.9909092 0.0000000
## [20,] 0.0000000 0.8072534 0.6065319 0.0000000 0.7052069 0.6265124 0.9467604
## [21,] 0.0000000 0.7848313 0.6065308 0.0000000 0.6938618 0.6275104 0.9782104
## [22,] 0.0000000 0.9890615 0.7572791 0.0000000 0.9011339 0.7833024 0.7825668
## [23,] 0.0000000 0.9458918 0.6999724 0.0000000 0.8362924 0.7241376 0.8719305
## [24,] 0.0000000 0.7551240 0.6065318 0.0000000 0.6783751 0.6200710 0.8636992
## [25,] 0.0000000 0.7810044 0.6065315 0.0000000 0.6911057 0.6242170 0.9327562
## [26,] 0.9455617 0.7238914 0.9218842 0.9785771 0.8361751 0.9162418 0.0000000
## [27,] 0.0000000 0.8865844 0.6230845 0.0000000 0.7692242 0.6578181 0.9357893
## [28,] 0.0000000 0.8983614 0.6238889 0.0000000 0.7734859 0.6572211 0.9380427
## [29,] 0.0000000 0.8478897 0.6130198 0.0000000 0.7364490 0.6428251 0.9879202
## [30,] 0.0000000 0.8865315 0.6247719 0.0000000 0.7621295 0.6536503 0.9603576
## [31,] 0.0000000 0.8064495 0.6065308 0.0000000 0.7074758 0.6317105 0.9988531
## [32,] 0.9475859 0.7356319 0.9323163 0.9866687 0.8473677 0.9250851 0.0000000
## [33,] 0.8303934 0.7854775 0.9775069 0.9952534 0.9055484 0.9731253 0.0000000
## [34,] 0.9854073 0.7000615 0.8896485 0.9579584 0.8034697 0.8829128 0.0000000
## [,8] [,9] [,10] [,11] [,12] [,13] [,14]
## [1,] 0.9351145 0.8192524 0.7812514 0.7402148 0.9149578 0.7318812 0.7826579
## [2,] 0.6412529 0.8674520 0.9369913 0.9781835 0.6869250 0.9331362 0.8881526
## [3,] 0.9390283 0.9934176 0.9634431 0.9180945 0.9017561 0.8120682 0.8482592
## [4,] 0.9912160 0.9477216 0.9064916 0.8590138 0.9514668 0.7964355 0.8424133
## [5,] 0.7735205 0.9764955 0.9985523 0.9891008 0.7766135 0.8677069 0.8672024
## [6,] 0.9309589 0.9967088 0.9737630 0.9325461 0.9036251 0.8326003 0.8666205
## [7,] 0.0000000 0.6459254 0.7154657 0.7633376 0.6699699 0.8966582 0.8641848
## [8,] 1.0000000 0.9295199 0.8911464 0.8418354 0.9792186 0.8044555 0.8606635
## [9,] 0.8993423 1.0000000 0.9861501 0.9530348 0.8752377 0.8446664 0.8682500
## [10,] 0.7958851 0.9811469 1.0000000 0.9859279 0.8025376 0.8748629 0.8816990
## [11,] 0.7339507 0.9422018 0.9872295 1.0000000 0.7628084 0.9213080 0.9043782
## [12,] 0.9705779 0.8776135 0.8539257 0.8070984 1.0000000 0.8215422 0.8932721
## [13,] 0.6657445 0.8045667 0.8814514 0.9182343 0.7722359 1.0000000 0.9836535
## [14,] 0.6890845 0.7854191 0.8540782 0.8703662 0.8212157 0.9783618 1.0000000
## [15,] 0.6112325 0.6746957 0.7499574 0.7855363 0.7552123 0.9586181 0.9595235
## [16,] 0.6277169 0.6326889 0.6921968 0.7151136 0.7768916 0.9031424 0.9246468
## [17,] 0.9797696 0.9559732 0.9295769 0.8827132 0.9773664 0.8414573 0.8970216
## [18,] 0.8960155 0.7704744 0.7621330 0.7279460 0.9697631 0.8066966 0.8813343
## [19,] 0.9775624 0.9782724 0.9460186 0.8995944 0.9501917 0.8269910 0.8720014
## [20,] 0.0000000 0.6435558 0.7031671 0.7501944 0.6181414 0.8292696 0.7864627
## [21,] 0.0000000 0.6389215 0.6963803 0.7384080 0.6571565 0.8466363 0.8155971
## [22,] 0.6065313 0.8171197 0.8922615 0.9440164 0.6591863 0.9288310 0.8737023
## [23,] 0.0000000 0.7542160 0.8280553 0.8843594 0.6357584 0.9049363 0.8462236
## [24,] 0.0000000 0.6334525 0.6754560 0.7101076 0.6090311 0.7604200 0.7275655
## [25,] 0.0000000 0.6380305 0.6900603 0.7309740 0.6275736 0.8086258 0.7729311
## [26,] 0.9908000 0.8916197 0.8511563 0.8030585 0.9697659 0.7792962 0.8364584
## [27,] 0.0000000 0.6799273 0.7731342 0.8350098 0.6486442 0.9609922 0.9135374
## [28,] 0.0000000 0.6818620 0.7745553 0.8389729 0.6316635 0.9489306 0.8946999
## [29,] 0.0000000 0.6600877 0.7403759 0.7956947 0.6578710 0.9265674 0.8852764
## [30,] 0.0000000 0.6774744 0.7607510 0.8220932 0.6260371 0.9172659 0.8622827
## [31,] 0.0000000 0.6443704 0.7116707 0.7588356 0.6655656 0.8863209 0.8532395
## [32,] 0.9898916 0.9025375 0.8603801 0.8126754 0.9595107 0.7770203 0.8298247
## [33,] 0.9951671 0.9554782 0.9176464 0.8693403 0.9657067 0.8122420 0.8620231
## [34,] 0.9695632 0.8580116 0.8177010 0.7723675 0.9479310 0.7564044 0.8112778
## [,15] [,16] [,17] [,18] [,19] [,20] [,21]
## [1,] 0.7318740 0.7486658 0.8911543 0.9042175 0.8833661 0.0000000 0.0000000
## [2,] 0.8168754 0.7195186 0.7660512 0.6065386 0.7623981 0.0000000 0.0000000
## [3,] 0.7137851 0.6631320 0.9709923 0.7852327 0.9916971 0.0000000 0.0000000
## [4,] 0.7457483 0.7281771 0.9754468 0.8812307 0.9860685 0.0000000 0.0000000
## [5,] 0.7224947 0.6309666 0.8820664 0.6457134 0.8981624 0.0000000 0.0000000
## [6,] 0.7329976 0.6794092 0.9727790 0.7887739 0.9892060 0.0000000 0.0000000
## [7,] 0.9368279 0.9209240 0.6538049 0.7070827 0.6065332 0.9088143 0.9655936
## [8,] 0.7671337 0.7578118 0.9855262 0.9223912 0.9814486 0.0000000 0.0000000
## [9,] 0.7352188 0.6731872 0.9544466 0.7569279 0.9740311 0.0000000 0.0000000
## [10,] 0.7356876 0.6479070 0.9019502 0.6730617 0.9132821 0.0000000 0.0000000
## [11,] 0.7917325 0.6985457 0.8522428 0.6572280 0.8548241 0.0000000 0.0000000
## [12,] 0.8065430 0.8075110 0.9770435 0.9683854 0.9418098 0.0000000 0.0000000
## [13,] 0.9583387 0.8927568 0.7943372 0.7441442 0.7459549 0.0000000 0.0000000
## [14,] 0.9462774 0.8906630 0.8249796 0.7940115 0.7554191 0.0000000 0.0000000
## [15,] 1.0000000 0.9810125 0.7246141 0.7914602 0.6505607 0.0000000 0.6826168
## [16,] 0.9828151 1.0000000 0.7170745 0.8464490 0.6361540 0.0000000 0.6896931
## [17,] 0.7841450 0.7575659 1.0000000 0.9003907 0.9904106 0.0000000 0.0000000
## [18,] 0.8426767 0.8737755 0.9032731 1.0000000 0.8432177 0.0000000 0.0000000
## [19,] 0.7553546 0.7214854 0.9917045 0.8589402 1.0000000 0.0000000 0.0000000
## [20,] 0.8421742 0.8168049 0.6209817 0.6350555 0.0000000 1.0000000 0.9760599
## [21,] 0.8852420 0.8770756 0.6421756 0.6937000 0.0000000 0.9737050 1.0000000
## [22,] 0.8362006 0.7469461 0.7238692 0.0000000 0.7156319 0.6677426 0.6390864
## [23,] 0.8483535 0.7770912 0.6799384 0.0000000 0.6662611 0.8414602 0.7929803
## [24,] 0.7698640 0.7535085 0.6122047 0.6223181 0.0000000 0.9497271 0.9131281
## [25,] 0.8295767 0.8140545 0.6243309 0.6503835 0.0000000 0.9916242 0.9758165
## [26,] 0.7589990 0.7622083 0.9605344 0.9326329 0.9536899 0.0000000 0.0000000
## [27,] 0.9519866 0.8914594 0.6596816 0.6506228 0.6105494 0.7384710 0.7893342
## [28,] 0.9312603 0.8667526 0.6492357 0.6283326 0.6065370 0.7840497 0.8117688
## [29,] 0.9469021 0.9115090 0.6539052 0.6801404 0.6065357 0.8625734 0.9114884
## [30,] 0.9067833 0.8526156 0.6418026 0.6273487 0.6065363 0.8919270 0.8918284
## [31,] 0.9257911 0.9111027 0.6501712 0.7022909 0.0000000 0.9309294 0.9791613
## [32,] 0.7499301 0.7488421 0.9588968 0.9149357 0.9589147 0.0000000 0.0000000
## [33,] 0.7592588 0.7391766 0.9892575 0.8925839 0.9939671 0.0000000 0.0000000
## [34,] 0.7469370 0.7577763 0.9302904 0.9245069 0.9229778 0.0000000 0.0000000
## [,22] [,23] [,24] [,25] [,26] [,27] [,28]
## [1,] 0.6276849 0.0000000 0.0000000 0.0000000 0.9666261 0.6477398 0.6246363
## [2,] 0.9869139 0.9137354 0.0000000 0.0000000 0.0000000 0.8879623 0.8917384
## [3,] 0.7499264 0.6065348 0.0000000 0.0000000 0.8706517 0.6679159 0.6466806
## [4,] 0.7140785 0.0000000 0.0000000 0.0000000 0.9775028 0.6793395 0.6571200
## [5,] 0.8589544 0.7021770 0.0000000 0.0000000 0.6505645 0.7291829 0.7154493
## [6,] 0.7680377 0.6235662 0.0000000 0.0000000 0.8559748 0.6886550 0.6670741
## [7,] 0.8408694 0.8770521 0.0000000 0.8548136 0.0000000 0.9620709 0.9604444
## [8,] 0.6871835 0.0000000 0.0000000 0.0000000 0.9886555 0.6798212 0.6521380
## [9,] 0.8025413 0.6596685 0.0000000 0.0000000 0.8141930 0.7073047 0.6891635
## [10,] 0.8441397 0.6840320 0.0000000 0.0000000 0.6742870 0.7296361 0.7125265
## [11,] 0.9252801 0.7990601 0.0000000 0.0000000 0.6148289 0.8184631 0.8095646
## [12,] 0.6410408 0.0000000 0.0000000 0.0000000 0.9475335 0.6834028 0.6456260
## [13,] 0.9016073 0.8271502 0.0000000 0.0000000 0.0000000 0.9550343 0.9364639
## [14,] 0.7777034 0.6563752 0.0000000 0.0000000 0.0000000 0.8704126 0.8311535
## [15,] 0.7793881 0.7332336 0.0000000 0.0000000 0.0000000 0.9450614 0.9152368
## [16,] 0.6924017 0.6503353 0.0000000 0.0000000 0.0000000 0.8875339 0.8514446
## [17,] 0.7118536 0.0000000 0.0000000 0.0000000 0.9326940 0.6972382 0.6666108
## [18,] 0.0000000 0.0000000 0.0000000 0.0000000 0.8895739 0.6967944 0.6550885
## [19,] 0.7376858 0.6065312 0.0000000 0.0000000 0.9315222 0.6908931 0.6664329
## [20,] 0.8492912 0.9097843 0.8967167 0.9892131 0.0000000 0.9038678 0.9159090
## [21,] 0.8194289 0.8696057 0.8095967 0.9658825 0.0000000 0.9169264 0.9205354
## [22,] 1.0000000 0.9714545 0.0000000 0.0000000 0.0000000 0.9249347 0.9358015
## [23,] 0.9788402 1.0000000 0.0000000 0.7339492 0.0000000 0.9440542 0.9604070
## [24,] 0.7897662 0.8436174 1.0000000 0.9683114 0.0000000 0.8203621 0.8320117
## [25,] 0.8191014 0.8768739 0.9485878 1.0000000 0.0000000 0.8787358 0.8885938
## [26,] 0.6609664 0.0000000 0.0000000 0.0000000 1.0000000 0.6678467 0.6408398
## [27,] 0.9096681 0.9097474 0.0000000 0.6065365 0.0000000 1.0000000 0.9968764
## [28,] 0.9283619 0.9405548 0.0000000 0.6558476 0.0000000 0.9971155 1.0000000
## [29,] 0.8790497 0.9065983 0.0000000 0.7728989 0.0000000 0.9871645 0.9866505
## [30,] 0.9256247 0.9624042 0.0000000 0.7952718 0.0000000 0.9817729 0.9910314
## [31,] 0.8391966 0.8801358 0.6373238 0.8873709 0.0000000 0.9544401 0.9545515
## [32,] 0.6738433 0.0000000 0.0000000 0.0000000 0.9977879 0.6681311 0.6435030
## [33,] 0.7142325 0.0000000 0.0000000 0.0000000 0.9715844 0.6854447 0.6603665
## [34,] 0.6438781 0.0000000 0.0000000 0.0000000 0.9919136 0.6579026 0.6325888
## [,29] [,30] [,31] [,32] [,33] [,34]
## [1,] 0.6065336 0.0000000 0.0000000 0.9651376 0.9146135 0.9888863
## [2,] 0.8016004 0.8436144 0.6705093 0.0000000 0.6860572 0.0000000
## [3,] 0.0000000 0.0000000 0.0000000 0.8783368 0.9697836 0.7790712
## [4,] 0.6065310 0.0000000 0.0000000 0.9847893 0.9960487 0.9449904
## [5,] 0.6065400 0.6264178 0.0000000 0.6488466 0.8279518 0.0000000
## [6,] 0.0000000 0.0000000 0.0000000 0.8603021 0.9623706 0.7576280
## [7,] 0.9904317 0.9668493 0.9987421 0.0000000 0.0000000 0.0000000
## [8,] 0.6065339 0.0000000 0.0000000 0.9864606 0.9952750 0.9532885
## [9,] 0.0000000 0.6065311 0.0000000 0.8189581 0.9374143 0.7089065
## [10,] 0.6065377 0.6192855 0.0000000 0.6705154 0.8466734 0.0000000
## [11,] 0.7084015 0.7324684 0.0000000 0.6065316 0.7819824 0.0000000
## [12,] 0.6065361 0.0000000 0.0000000 0.9241670 0.9526461 0.8889738
## [13,] 0.8871517 0.8668931 0.7689925 0.0000000 0.6837695 0.0000000
## [14,] 0.7757528 0.7223149 0.6322064 0.0000000 0.6975187 0.0000000
## [15,] 0.9184479 0.8515116 0.8464644 0.0000000 0.6065362 0.0000000
## [16,] 0.8775399 0.7891157 0.8336119 0.0000000 0.6088918 0.0000000
## [17,] 0.6065337 0.0000000 0.0000000 0.9240912 0.9853074 0.8549025
## [18,] 0.6441173 0.0000000 0.0000000 0.8503386 0.8598596 0.8478001
## [19,] 0.0000000 0.0000000 0.0000000 0.9340572 0.9928565 0.8604257
## [20,] 0.9352727 0.9469187 0.9560773 0.0000000 0.0000000 0.0000000
## [21,] 0.9549163 0.9417297 0.9855717 0.0000000 0.0000000 0.0000000
## [22,] 0.8656599 0.9129081 0.7618551 0.0000000 0.6450009 0.0000000
## [23,] 0.9221627 0.9671863 0.8639070 0.0000000 0.6065310 0.0000000
## [24,] 0.8487640 0.8626837 0.8747972 0.0000000 0.0000000 0.0000000
## [25,] 0.9135374 0.9187696 0.9435017 0.0000000 0.0000000 0.0000000
## [26,] 0.6065343 0.0000000 0.0000000 0.9975958 0.9774290 0.9898722
## [27,] 0.9826127 0.9740296 0.9159629 0.0000000 0.0000000 0.0000000
## [28,] 0.9832924 0.9881712 0.9223333 0.0000000 0.0000000 0.0000000
## [29,] 1.0000000 0.9853131 0.9803121 0.0000000 0.0000000 0.0000000
## [30,] 0.9860544 1.0000000 0.9548592 0.0000000 0.0000000 0.0000000
## [31,] 0.9857605 0.9655085 1.0000000 0.0000000 0.0000000 0.0000000
## [32,] 0.6065337 0.0000000 0.0000000 1.0000000 0.9810209 0.9886668
## [33,] 0.6065319 0.0000000 0.0000000 0.9740442 1.0000000 0.9247784
## [34,] 0.6065343 0.0000000 0.0000000 0.9901672 0.9518027 1.0000000
#menampilkan t hitung
gwr.adapttricube[1]
## $SDF
## coordinates sum.w X.Intercept. X1 X2
## 1 (96.7494, 4.695135) 12.172213 -42.69183 -0.4261803 1.4488742
## 2 (115.092, -8.340539) 11.899650 -185.56372 -0.7901746 1.1584198
## 3 (106.064, -6.405817) 14.645565 -57.49820 -0.6468809 1.1218242
## 4 (102.2608, -3.792845) 16.394478 -59.65252 -0.4615300 1.4352685
## 5 (110.3647, -7.80139) 11.452726 -145.45025 -0.5747824 1.1272836
## 6 (106.8456, -6.208763) 14.857905 -67.93368 -0.6448622 1.1009307
## 7 (123.0568, 0.5435442) 13.130219 -66.60425 -0.7195954 1.0188354
## 8 (103.6131, -1.610123) 16.456060 -53.80166 -0.4597075 1.3092794
## 9 (107.6689, -7.090911) 14.318904 -83.64507 -0.6401947 1.0996728
## 10 (110.1403, -7.150975) 11.991000 -137.43128 -0.5668674 1.0473208
## 11 (112.2384, -7.536064) 12.333138 -163.90027 -0.6619113 1.0069008
## 12 (106.6131, 0.4773475) 14.706651 -47.95961 -0.5819822 0.9842766
## 13 (115.2838, -3.092642) 13.227696 -167.50115 -0.7569936 1.1477496
## 14 (113.3824, -1.681488) 9.684780 -174.83206 -0.7721602 1.1391189
## 15 (116.4194, 0.5386586) 10.095456 -135.65637 -0.7963754 1.5780105
## 16 (116.0414, 3.073093) 8.059706 -75.96877 -0.9420901 1.3185509
## 17 (106.4406, -2.741051) 16.269362 -55.89784 -0.5990547 1.0629843
## 18 (108.1429, 3.945651) 10.535148 -49.50623 -0.7726153 0.7893114
## 19 (105.4068, -4.558585) 16.283775 -60.87829 -0.5928553 1.2074065
## 20 (130.1453, -3.238462) 12.488848 -46.54220 -0.5323428 0.7640006
## 21 (127.8088, 1.570999) 12.578672 -42.80830 -0.5822232 0.7449408
## 22 (117.3616, -8.652933) 12.133086 -170.15726 -0.7895981 1.0394940
## 23 (121.0794, -8.657382) 12.755901 -108.16494 -0.8209023 1.1119153
## 24 (141.347, -5.01222) 8.816679 -41.28460 -0.4297292 0.6936253
## 25 (133.1747, -1.336115) 11.607660 -39.54740 -0.4975772 0.6856259
## 26 (101.7068, 0.2933469) 15.509372 -48.24501 -0.4292402 1.3463435
## 27 (119.2321, -2.844137) 12.667552 -130.45677 -0.8604170 1.5328980
## 28 (119.9741, -3.668799) 12.927918 -111.11832 -0.8910482 1.2452521
## 29 (121.4456, -1.430025) 13.382116 -81.15905 -0.7771577 1.1050430
## 30 (122.1746, -4.14491) 13.608231 -83.34586 -0.7650996 1.0581892
## 31 (123.975, 0.624693) 13.117438 -63.15137 -0.7015543 0.9782741
## 32 (100.8, -0.7399397) 15.622936 -49.44163 -0.4236337 1.3966537
## 33 (103.9144, -3.319437) 16.651395 -59.29623 -0.4957110 1.3361096
## 34 (99.5451, 2.115355) 14.151473 -44.67179 -0.4266065 1.3899186
## X3 X4 X5 X6 X7 X8
## 1 -35.3067975 -0.43348018 -0.761510869 0.5909033 -0.13108990 0.128223369
## 2 70.4584861 -0.23223625 0.937421187 1.3214817 1.09799145 -0.110308658
## 3 -0.2260353 -0.29512004 0.025069489 0.9191915 0.07093011 -0.063945804
## 4 -6.7566337 -0.28789037 -0.388278379 0.7308992 0.00645945 -0.073282708
## 5 69.4660588 -0.07036477 0.675932919 1.1346411 0.40367377 -0.113686989
## 6 8.8494913 -0.25069606 0.139626069 0.9244426 0.09993236 -0.064070870
## 7 3.6158691 -0.39666128 0.115345611 0.7587379 0.80925630 0.019325726
## 8 -11.0368357 -0.30265817 -0.427656840 0.6692293 -0.02360896 0.014267250
## 9 21.9814284 -0.20490303 0.294713169 0.9801821 0.15629684 -0.083552506
## 10 64.2007980 -0.06577162 0.675509253 1.0681812 0.35880687 -0.095409879
## 11 69.3301400 -0.12256909 0.888383376 1.1283462 0.66528221 -0.033613748
## 12 -14.3180777 -0.31884133 -0.228467109 0.6177906 -0.04410855 0.181821901
## 13 62.3415269 -0.23833825 0.849861075 1.0360364 1.03202413 -0.063211727
## 14 77.2424404 -0.09030963 0.908187264 1.1048766 0.92416632 -0.191177576
## 15 35.0649748 -0.51469864 0.378612919 0.7791701 0.92344542 0.058671654
## 16 9.0079629 -0.74413036 0.250614378 0.5477984 0.92156574 0.070556687
## 17 -2.3963817 -0.27300957 -0.079700781 0.7590934 0.02338568 0.034315431
## 18 -4.7901469 -0.28894107 0.098591889 0.7056954 0.03360917 0.172074764
## 19 -0.1105068 -0.27064902 -0.081084112 0.8198240 0.04219230 -0.045705831
## 20 9.8451411 -0.10155166 -0.026580061 0.5622757 0.68976386 -0.019163447
## 21 9.4069975 -0.20872438 -0.001795442 0.5917343 0.71251292 -0.006968800
## 22 58.9966319 -0.25717801 0.916293864 1.1988403 1.08169622 -0.031651342
## 23 22.8404843 -0.24923698 0.288357006 1.0842120 0.87608235 0.048507098
## 24 5.3327523 -0.04694936 -0.064765356 0.4166138 0.61953773 0.057266048
## 25 8.5941214 -0.09621356 -0.043152909 0.4934344 0.65578337 0.015498960
## 26 -20.5500720 -0.34864067 -0.582990450 0.6181241 -0.06650801 0.065756645
## 27 18.4279746 -0.46085833 0.271830500 0.9579497 0.78451338 0.280435839
## 28 10.4869532 -0.39609533 0.310976781 0.9660594 0.75896368 0.291088662
## 29 6.7678180 -0.38410507 0.170603798 0.8379741 0.80269941 0.077381380
## 30 9.7988836 -0.30092685 0.181738206 0.8914186 0.83042212 0.023838515
## 31 2.9227779 -0.37971155 0.106627169 0.7412626 0.80672438 0.009342589
## 32 -18.9529547 -0.34240825 -0.583510855 0.6440739 -0.05318112 0.023380736
## 33 -4.7817543 -0.27922542 -0.305285281 0.7367033 0.01086042 -0.044867040
## 34 -28.1892102 -0.39125921 -0.679244648 0.6003110 -0.09908167 0.099739016
## X9 X.Intercept._se X1_se X2_se X3_se X4_se X5_se
## 1 8.32875237 55.27511 0.3227833 0.8950492 37.34812 0.2598004 0.5618626
## 2 0.21361981 69.28914 0.2973462 1.3288833 36.37699 0.2291055 0.8204912
## 3 1.34234477 58.76639 0.2700759 0.8995883 34.78410 0.2594203 0.5574902
## 4 3.86783718 52.94162 0.2547278 0.8273609 32.97674 0.2431142 0.5133445
## 5 -0.90843196 69.12864 0.3137218 1.2089045 41.57953 0.2696481 0.6808518
## 6 0.84464338 57.56025 0.2640325 0.8900817 33.62399 0.2494672 0.5378802
## 7 0.63175229 54.68175 0.2509308 0.7453633 34.92172 0.2792111 0.3482456
## 8 5.24914417 52.39603 0.2663272 0.8306687 32.74823 0.2379918 0.5050895
## 9 -0.12286335 58.54246 0.2645068 0.9189864 33.84038 0.2467465 0.5384762
## 10 -0.61266348 67.90757 0.3052132 1.1385694 40.69745 0.2664722 0.6394819
## 11 0.04659708 64.91997 0.2944234 1.1865491 35.80763 0.2228217 0.6980520
## 12 6.07482357 51.95858 0.2973085 0.8350605 32.46976 0.2337462 0.4932620
## 13 0.28955896 52.90618 0.2740790 1.0234213 33.01845 0.2147610 0.6862651
## 14 0.56374817 56.66731 0.2835991 1.0937191 34.81666 0.2296659 0.7441568
## 15 0.54259433 54.56062 0.3126491 0.8835175 36.52144 0.2733771 0.4815496
## 16 0.62144739 62.99342 0.3664559 0.9426908 43.65263 0.3563681 0.5024764
## 17 3.42423321 52.15281 0.2671228 0.8317920 31.38902 0.2317297 0.5010733
## 18 4.24415315 55.00639 0.3238156 0.8507954 31.39985 0.2352704 0.4899644
## 19 2.36840226 52.99822 0.2541580 0.8343867 32.15117 0.2389873 0.5110028
## 20 0.48486789 55.65147 0.2433530 0.7749249 35.73940 0.2529093 0.3397264
## 21 0.51386380 56.31656 0.2481592 0.7718032 34.92145 0.2593794 0.3394322
## 22 0.24672331 63.32394 0.2855381 1.1148588 37.08952 0.2274768 0.7124295
## 23 0.63319622 52.72631 0.2448633 0.6898011 33.78801 0.2292661 0.3451780
## 24 0.49010267 56.65087 0.2482436 0.7934549 36.66815 0.2596054 0.3453584
## 25 0.48355688 56.59607 0.2465319 0.7847165 36.05657 0.2580489 0.3411031
## 26 6.71571574 53.35454 0.2890175 0.8524065 34.31948 0.2444154 0.5237977
## 27 0.65840583 59.12136 0.2870034 0.8174737 37.34370 0.2544636 0.3862684
## 28 0.67527626 55.66193 0.2770320 0.7538097 36.36391 0.2509748 0.3736007
## 29 0.64638839 53.70295 0.2492198 0.7298057 34.79121 0.2658680 0.3490759
## 30 0.63354124 54.07772 0.2455382 0.7265358 34.77007 0.2574503 0.3467627
## 31 0.62704250 55.28566 0.2513846 0.7539367 35.14029 0.2806678 0.3487217
## 32 6.19136002 53.57605 0.2827157 0.8490239 34.30973 0.2461036 0.5273357
## 33 3.77576707 52.27861 0.2520554 0.8225610 32.26093 0.2380542 0.5028540
## 34 7.59280602 54.24371 0.3061491 0.8722702 35.80208 0.2515803 0.5421858
## X6_se X7_se X8_se X9_se gwr.e pred pred.se
## 1 0.4272683 0.2287456 0.3883248 3.4744335 -1.9160428 13.026043 3.419391
## 2 0.4471188 0.3159847 0.3419764 0.5165691 0.9289263 15.431074 3.567970
## 3 0.4338842 0.2153134 0.3663500 2.1573872 -1.3170460 18.967046 3.068359
## 4 0.4053423 0.2123724 0.3495401 2.3289319 0.4670193 15.092981 3.448990
## 5 0.4683734 0.2308551 0.3901030 1.4658700 0.9634139 19.036586 3.017597
## 6 0.4099480 0.2118978 0.3572456 1.9525345 -1.0987063 21.848706 3.487193
## 7 0.3584178 0.2513446 0.2624132 0.2995004 5.9477533 20.722247 3.628361
## 8 0.3995763 0.2133470 0.3513017 2.5777940 -3.0072275 19.367227 3.502931
## 9 0.4039865 0.2096619 0.3515698 1.7136643 -0.1003530 21.950353 2.452851
## 10 0.4402818 0.2224990 0.3862156 1.5161036 -2.5439021 22.543902 2.931001
## 11 0.4258397 0.2473219 0.3300200 0.6497266 -1.7375671 20.907567 2.660022
## 12 0.3970040 0.2146120 0.3543955 2.8372286 -2.0685017 20.528502 2.439982
## 13 0.3554237 0.2593159 0.3173950 0.5013170 -0.2393261 20.239326 2.779510
## 14 0.3783908 0.3011755 0.3279993 0.5095041 4.2886329 29.041367 2.999965
## 15 0.3511640 0.2819499 0.3804987 0.3653618 0.1087650 19.891235 3.112206
## 16 0.3758190 0.2954071 0.4017579 0.3417390 -2.7687784 14.198778 3.226810
## 17 0.3840840 0.2084239 0.3417405 2.2324626 -5.3914914 14.281491 2.616866
## 18 0.3706460 0.2093300 0.3134017 1.7990241 -0.6608266 9.550827 3.562307
## 19 0.3935000 0.2095393 0.3457607 2.0778707 4.8300291 13.989971 2.581908
## 20 0.3688820 0.2483588 0.2714366 0.2739800 1.0578264 21.162174 3.768590
## 21 0.3634355 0.2481903 0.2658508 0.2756129 -0.3334160 29.223416 4.209973
## 22 0.3928351 0.2892906 0.3433761 0.4838017 -3.8128378 5.402838 3.370684
## 23 0.3495493 0.2524192 0.2607852 0.3003851 2.9119647 17.088035 3.099311
## 24 0.3835752 0.2561618 0.2843844 0.2771084 1.5309383 12.759062 3.640131
## 25 0.3726370 0.2508181 0.2737191 0.2739144 0.4985362 15.441464 3.719485
## 26 0.4102813 0.2187252 0.3643538 2.9451287 2.3428765 19.197123 3.560956
## 27 0.3516545 0.2837653 0.3928615 0.3087207 -3.3349625 14.694963 3.110591
## 28 0.3538297 0.2793002 0.3782540 0.3066370 0.7441225 26.315878 1.716664
## 29 0.3557095 0.2525034 0.2736212 0.2997363 -0.2986878 29.188688 4.143284
## 30 0.3577645 0.2511111 0.2636937 0.2993009 2.6549949 17.345005 3.182422
## 31 0.3599448 0.2518740 0.2628295 0.2991365 -4.6648489 34.214849 3.689541
## 32 0.4121346 0.2177275 0.3618752 2.8344783 -1.8513740 12.621374 2.838115
## 33 0.3964648 0.2108204 0.3457477 2.2823307 3.2397420 18.090258 2.196440
## 34 0.4189028 0.2235317 0.3758771 3.2113336 1.3364861 12.803514 2.575092
## localR2 X.Intercept._se_EDF X1_se_EDF X2_se_EDF X3_se_EDF X4_se_EDF
## 1 0.7457221 61.63646 0.3599309 0.9980561 41.64633 0.2896996
## 2 0.8817407 77.26330 0.3315664 1.4818181 40.56344 0.2554722
## 3 0.7251348 65.52953 0.3011577 1.0031176 38.78724 0.2892757
## 4 0.7488002 59.03442 0.2840432 0.9225779 36.77188 0.2710930
## 5 0.8039641 77.08432 0.3498266 1.3480315 46.36472 0.3006806
## 6 0.7413272 64.18458 0.2944187 0.9925170 37.49362 0.2781772
## 7 0.8536168 60.97481 0.2798092 0.8311435 38.94069 0.3113441
## 8 0.7570469 58.42604 0.2969776 0.9262664 36.51707 0.2653811
## 9 0.7555950 65.27984 0.2949476 1.0247481 37.73491 0.2751434
## 10 0.7937815 75.72273 0.3403387 1.2696018 45.38113 0.2971392
## 11 0.8486656 72.39130 0.3283072 1.3231033 39.92856 0.2484652
## 12 0.7706386 57.93825 0.3315243 0.9311637 36.20655 0.2606470
## 13 0.8738387 58.99490 0.3056214 1.1412020 36.81839 0.2394768
## 14 0.8736180 63.18887 0.3162371 1.2195900 38.82354 0.2560971
## 15 0.8643033 60.83974 0.3486304 0.9851972 40.72452 0.3048388
## 16 0.8635137 70.24303 0.4086296 1.0511806 48.67640 0.3973808
## 17 0.7593481 58.15483 0.2978647 0.9275190 35.00143 0.2583983
## 18 0.8028899 61.33681 0.3610820 0.9487094 35.01351 0.2623465
## 19 0.7508645 59.09753 0.2834078 0.9304122 35.85130 0.2664912
## 20 0.8580441 62.05613 0.2713594 0.8641072 39.85247 0.2820154
## 21 0.8510684 62.79776 0.2767187 0.8606263 38.94039 0.2892301
## 22 0.8802780 70.61159 0.3183993 1.2431626 41.35797 0.2536560
## 23 0.8729260 58.79432 0.2730435 0.7691870 37.67651 0.2556512
## 24 0.8591545 63.17054 0.2768128 0.8847699 40.88811 0.2894821
## 25 0.8549244 63.10944 0.2749041 0.8750257 40.20615 0.2877465
## 26 0.7538407 59.49486 0.3222792 0.9505059 38.26914 0.2725440
## 27 0.8632856 65.92536 0.3200333 0.9115529 41.64141 0.2837486
## 28 0.8642741 62.06779 0.3089143 0.8405621 40.54886 0.2798583
## 29 0.8573194 59.88337 0.2779014 0.8137956 38.79517 0.2964655
## 30 0.8631240 60.30127 0.2737960 0.8101493 38.77159 0.2870791
## 31 0.8531578 61.64822 0.2803152 0.8407037 39.18442 0.3129686
## 32 0.7494797 59.74186 0.3152521 0.9467340 38.25827 0.2744265
## 33 0.7542202 58.29510 0.2810633 0.9172256 35.97368 0.2654507
## 34 0.7493626 60.48635 0.3413823 0.9726556 39.92237 0.2805335
## X5_se_EDF X6_se_EDF X7_se_EDF X8_se_EDF X9_se_EDF pred.se.1
## 1 0.6265247 0.4764406 0.2550708 0.4330152 3.8742894 3.812912
## 2 0.9149176 0.4985756 0.3523499 0.3813328 0.5760186 3.978591
## 3 0.6216491 0.4838179 0.2400928 0.4085114 2.4056705 3.421481
## 4 0.5724228 0.4519912 0.2368133 0.3897670 2.5969575 3.845917
## 5 0.7592078 0.5222762 0.2574231 0.4349981 1.6345699 3.364878
## 6 0.5997823 0.4571269 0.2362841 0.3983593 2.1772423 3.888517
## 7 0.3883235 0.3996664 0.2802707 0.2926131 0.3339685 4.045932
## 8 0.5632179 0.4455616 0.2379001 0.3917313 2.8744599 3.906066
## 9 0.6004469 0.4504794 0.2337909 0.3920303 1.9108817 2.735138
## 10 0.7130768 0.4909518 0.2481054 0.4306633 1.6905847 3.268316
## 11 0.7783874 0.4748475 0.2757850 0.3680004 0.7245005 2.966151
## 12 0.5500291 0.4426933 0.2393106 0.3951812 3.1637516 2.720788
## 13 0.7652441 0.3963277 0.2891593 0.3539225 0.5590112 3.099391
## 14 0.8297982 0.4219380 0.3358363 0.3657471 0.5681405 3.345217
## 15 0.5369688 0.3915778 0.3143982 0.4242885 0.4074095 3.470375
## 16 0.5603040 0.4190702 0.3294041 0.4479943 0.3810681 3.598168
## 17 0.5587394 0.4282863 0.2324104 0.3810698 2.4893860 2.918029
## 18 0.5463521 0.4133018 0.2334208 0.3494695 2.0060651 3.972276
## 19 0.5698117 0.4387860 0.2336542 0.3855526 2.3170028 2.879047
## 20 0.3788239 0.4113349 0.2769412 0.3026749 0.3055111 4.202298
## 21 0.3784958 0.4052615 0.2767533 0.2964463 0.3073319 4.694479
## 22 0.7944196 0.4380446 0.3225836 0.3828936 0.5394801 3.758600
## 23 0.3849029 0.3897773 0.2814689 0.2907977 0.3349549 3.455996
## 24 0.3851040 0.4277190 0.2856422 0.3171128 0.3089995 4.059056
## 25 0.3803590 0.4155220 0.2796836 0.3052201 0.3054378 4.147543
## 26 0.5840790 0.4574986 0.2438973 0.4062855 3.2840694 3.970769
## 27 0.4307222 0.3921247 0.3164225 0.4380740 0.3442499 3.468574
## 28 0.4165966 0.3945502 0.3114435 0.4217855 0.3419264 1.914227
## 29 0.3892494 0.3966464 0.2815628 0.3051109 0.3342315 4.620115
## 30 0.3866700 0.3989379 0.2800102 0.2940410 0.3337460 3.548672
## 31 0.3888544 0.4013691 0.2808610 0.2930773 0.3335626 4.114152
## 32 0.5880242 0.4595652 0.2427847 0.4035217 3.1606848 3.164741
## 33 0.5607251 0.4420920 0.2350827 0.3855382 2.5449932 2.449218
## 34 0.6045833 0.4671123 0.2492569 0.4191350 3.5809106 2.871447
t_Intercept0=gwr.adapttricube$SDF$`(Intercept)`/gwr.adapttricube$SDF$`(Intercept)_se`
t_X1=gwr.adapttricube$SDF$X1/gwr.adapttricube$SDF$X1_se
t_X1
## [1] -1.320330 -2.657423 -2.395182 -1.811856 -1.832140 -2.442359 -2.867705
## [8] -1.726100 -2.420334 -1.857283 -2.248161 -1.957503 -2.761954 -2.722717
## [15] -2.547186 -2.570814 -2.242619 -2.385973 -2.332625 -2.187533 -2.346168
## [22] -2.765299 -3.352492 -1.731078 -2.018308 -1.485170 -2.997933 -3.216409
## [29] -3.118362 -3.116010 -2.790761 -1.498444 -1.966675 -1.393460
t_X2=gwr.adapttricube$SDF$X2/gwr.adapttricube$SDF$X2_se
t_X2
## [1] 1.6187649 0.8717242 1.2470418 1.7347550 0.9324836 1.2368872 1.3668978
## [8] 1.5761752 1.1966149 0.9198568 0.8485960 1.1786889 1.1214830 1.0415096
## [15] 1.7860547 1.3987098 1.2779449 0.9277335 1.4470586 0.9859028 0.9651953
## [22] 0.9323997 1.6119362 0.8741837 0.8737244 1.5794617 1.8751648 1.6519449
## [29] 1.5141605 1.4564860 1.2975546 1.6450111 1.6243289 1.5934496
t_X3=gwr.adapttricube$SDF$X3/gwr.adapttricube$SDF$X3_se
t_X3
## [1] -0.945343456 1.936897177 -0.006498236 -0.204890883 1.670679241
## [6] 0.263189765 0.103542128 -0.337020831 0.649562099 1.577513912
## [11] 1.936183221 -0.440966478 1.888081299 2.218548149 0.960120147
## [16] 0.206355573 -0.076344593 -0.152553186 -0.003437101 0.275470270
## [21] 0.269375907 1.590655041 0.675993802 0.145432830 0.238351033
## [26] -0.598787426 0.493469379 0.288389054 0.194526639 0.281819489
## [31] 0.083174556 -0.552407651 -0.148221229 -0.787362353
t_X4=gwr.adapttricube$SDF$X4/gwr.adapttricube$SDF$X4_se
t_X4
## [1] -1.6685123 -1.0136649 -1.1376135 -1.1841777 -0.2609504 -1.0049258
## [7] -1.4206503 -1.2717168 -0.8304192 -0.2468235 -0.5500769 -1.3640490
## [13] -1.1097838 -0.3932217 -1.8827422 -2.0880947 -1.1781383 -1.2281235
## [19] -1.1324826 -0.4015339 -0.8047068 -1.1305683 -1.0871079 -0.1808489
## [25] -0.3728501 -1.4264266 -1.8110975 -1.5782272 -1.4447208 -1.1688734
## [31] -1.3528858 -1.3913175 -1.1729489 -1.5552061
t_X5=gwr.adapttricube$SDF$X5/gwr.adapttricube$SDF$X5_se
t_X5
## [1] -1.355332784 1.142512196 0.044968484 -0.756370042 0.992775360
## [6] 0.259585793 0.331219192 -0.846695100 0.547309524 1.056338280
## [11] 1.272660747 -0.463176016 1.238385888 1.220424583 0.786238736
## [16] 0.498758458 -0.159060127 0.201222550 -0.158676442 -0.078239603
## [21] -0.005289545 1.286153759 0.835386315 -0.187530853 -0.126509872
## [26] -1.113006987 0.703734724 0.832377381 0.488729786 0.524099627
## [31] 0.305765807 -1.106526444 -0.607105159 -1.252789536
t_X6=gwr.adapttricube$SDF$X6/gwr.adapttricube$SDF$X6_se
t_X6
## [1] 1.382979 2.955549 2.118518 1.803165 2.422514 2.255024 2.116909 1.674847
## [9] 2.426274 2.426131 2.649697 1.556132 2.914933 2.919935 2.218821 1.457612
## [17] 1.976374 1.903961 2.083416 1.524270 1.628169 3.051764 3.101742 1.086133
## [25] 1.324169 1.506586 2.724122 2.730295 2.355782 2.491635 2.059379 1.562776
## [33] 1.858181 1.433056
t_X7=gwr.adapttricube$SDF$X7/gwr.adapttricube$SDF$X7_se
t_X7
## [1] -0.57308174 3.47482437 0.32942728 0.03041568 1.74860239 0.47160643
## [7] 3.21970808 -0.11065992 0.74547087 1.61262211 2.68994454 -0.20552697
## [13] 3.97979492 3.06853115 3.27521047 3.11964645 0.11220250 0.16055590
## [19] 0.20135742 2.77728795 2.87083309 3.73913414 3.47074383 2.41854093
## [25] 2.61457731 -0.30407106 2.76465576 2.71737596 3.17896517 3.30699131
## [31] 3.20288842 -0.24425540 0.05151504 -0.44325551
t_X8=gwr.adapttricube$SDF$X8/gwr.adapttricube$SDF$X8_se
t_X8
## [1] 0.33019618 -0.32256219 -0.17454841 -0.20965467 -0.29142812 -0.17934684
## [7] 0.07364616 0.04061253 -0.23765550 -0.24703789 -0.10185368 0.51304796
## [13] -0.19915789 -0.58285974 0.15419672 0.17561991 0.10041370 0.54905505
## [19] -0.13218921 -0.07060009 -0.02621320 -0.09217690 0.18600403 0.20136848
## [25] 0.05662360 0.18047472 0.71382885 0.76955869 0.28280482 0.09040228
## [31] 0.03554619 0.06460995 -0.12976814 0.26535006
t_X9=gwr.adapttricube$SDF$X9/gwr.adapttricube$SDF$X9_se
t_X9
## [1] 2.39715404 0.41353575 0.62220856 1.66077729 -0.61972206 0.43258820
## [7] 2.10935375 2.03629314 -0.07169628 -0.40410397 0.07171798 2.14111180
## [13] 0.57759648 1.10646438 1.48508775 1.81848562 1.53383677 2.35914192
## [19] 1.13982180 1.76971975 1.86443998 0.50996788 2.10794848 1.76863170
## [25] 1.76535792 2.28027919 2.13269102 2.20220078 2.15652376 2.11673682
## [31] 2.09617551 2.18430317 1.65434705 2.36437781
t tabel (a/2;n-k-1)=(0.025;(34-9-1)24=2,063898562=2,0639 t tabel (a/2;n-k-1)=(0.05;(34-9-1)24=-1,71088208 = 1,71088
#Estimasi parameter
B0<-gwr.adapttricube$SDF$"(Intercept)"
B0
## [1] -42.69183 -185.56372 -57.49820 -59.65252 -145.45025 -67.93368
## [7] -66.60425 -53.80166 -83.64507 -137.43128 -163.90027 -47.95961
## [13] -167.50115 -174.83206 -135.65637 -75.96877 -55.89784 -49.50623
## [19] -60.87829 -46.54220 -42.80830 -170.15726 -108.16494 -41.28460
## [25] -39.54740 -48.24501 -130.45677 -111.11832 -81.15905 -83.34586
## [31] -63.15137 -49.44163 -59.29623 -44.67179
B1 <-gwr.adapttricube$SDF$X1
B1
## [1] -0.4261803 -0.7901746 -0.6468809 -0.4615300 -0.5747824 -0.6448622
## [7] -0.7195954 -0.4597075 -0.6401947 -0.5668674 -0.6619113 -0.5819822
## [13] -0.7569936 -0.7721602 -0.7963754 -0.9420901 -0.5990547 -0.7726153
## [19] -0.5928553 -0.5323428 -0.5822232 -0.7895981 -0.8209023 -0.4297292
## [25] -0.4975772 -0.4292402 -0.8604170 -0.8910482 -0.7771577 -0.7650996
## [31] -0.7015543 -0.4236337 -0.4957110 -0.4266065
B2 <-gwr.adapttricube$SDF$X2
B2
## [1] 1.4488742 1.1584198 1.1218242 1.4352685 1.1272836 1.1009307 1.0188354
## [8] 1.3092794 1.0996728 1.0473208 1.0069008 0.9842766 1.1477496 1.1391189
## [15] 1.5780105 1.3185509 1.0629843 0.7893114 1.2074065 0.7640006 0.7449408
## [22] 1.0394940 1.1119153 0.6936253 0.6856259 1.3463435 1.5328980 1.2452521
## [29] 1.1050430 1.0581892 0.9782741 1.3966537 1.3361096 1.3899186
B3 <-gwr.adapttricube$SDF$X3
B3
## [1] -35.3067975 70.4584861 -0.2260353 -6.7566337 69.4660588 8.8494913
## [7] 3.6158691 -11.0368357 21.9814284 64.2007980 69.3301400 -14.3180777
## [13] 62.3415269 77.2424404 35.0649748 9.0079629 -2.3963817 -4.7901469
## [19] -0.1105068 9.8451411 9.4069975 58.9966319 22.8404843 5.3327523
## [25] 8.5941214 -20.5500720 18.4279746 10.4869532 6.7678180 9.7988836
## [31] 2.9227779 -18.9529547 -4.7817543 -28.1892102
B4 <-gwr.adapttricube$SDF$X4
B4
## [1] -0.43348018 -0.23223625 -0.29512004 -0.28789037 -0.07036477 -0.25069606
## [7] -0.39666128 -0.30265817 -0.20490303 -0.06577162 -0.12256909 -0.31884133
## [13] -0.23833825 -0.09030963 -0.51469864 -0.74413036 -0.27300957 -0.28894107
## [19] -0.27064902 -0.10155166 -0.20872438 -0.25717801 -0.24923698 -0.04694936
## [25] -0.09621356 -0.34864067 -0.46085833 -0.39609533 -0.38410507 -0.30092685
## [31] -0.37971155 -0.34240825 -0.27922542 -0.39125921
B5 <-gwr.adapttricube$SDF$X5
B5
## [1] -0.761510869 0.937421187 0.025069489 -0.388278379 0.675932919
## [6] 0.139626069 0.115345611 -0.427656840 0.294713169 0.675509253
## [11] 0.888383376 -0.228467109 0.849861075 0.908187264 0.378612919
## [16] 0.250614378 -0.079700781 0.098591889 -0.081084112 -0.026580061
## [21] -0.001795442 0.916293864 0.288357006 -0.064765356 -0.043152909
## [26] -0.582990450 0.271830500 0.310976781 0.170603798 0.181738206
## [31] 0.106627169 -0.583510855 -0.305285281 -0.679244648
B6 <-gwr.adapttricube$SDF$X6
B6
## [1] 0.5909033 1.3214817 0.9191915 0.7308992 1.1346411 0.9244426 0.7587379
## [8] 0.6692293 0.9801821 1.0681812 1.1283462 0.6177906 1.0360364 1.1048766
## [15] 0.7791701 0.5477984 0.7590934 0.7056954 0.8198240 0.5622757 0.5917343
## [22] 1.1988403 1.0842120 0.4166138 0.4934344 0.6181241 0.9579497 0.9660594
## [29] 0.8379741 0.8914186 0.7412626 0.6440739 0.7367033 0.6003110
B7 <-gwr.adapttricube$SDF$X7
B7
## [1] -0.13108990 1.09799145 0.07093011 0.00645945 0.40367377 0.09993236
## [7] 0.80925630 -0.02360896 0.15629684 0.35880687 0.66528221 -0.04410855
## [13] 1.03202413 0.92416632 0.92344542 0.92156574 0.02338568 0.03360917
## [19] 0.04219230 0.68976386 0.71251292 1.08169622 0.87608235 0.61953773
## [25] 0.65578337 -0.06650801 0.78451338 0.75896368 0.80269941 0.83042212
## [31] 0.80672438 -0.05318112 0.01086042 -0.09908167
B8 <-gwr.adapttricube$SDF$X8
B8
## [1] 0.128223369 -0.110308658 -0.063945804 -0.073282708 -0.113686989
## [6] -0.064070870 0.019325726 0.014267250 -0.083552506 -0.095409879
## [11] -0.033613748 0.181821901 -0.063211727 -0.191177576 0.058671654
## [16] 0.070556687 0.034315431 0.172074764 -0.045705831 -0.019163447
## [21] -0.006968800 -0.031651342 0.048507098 0.057266048 0.015498960
## [26] 0.065756645 0.280435839 0.291088662 0.077381380 0.023838515
## [31] 0.009342589 0.023380736 -0.044867040 0.099739016
#uji kesesuaian model GWR
BFC02.gwr.test(gwr.adapttricube)
##
## Brunsdon, Fotheringham & Charlton (2002, pp. 91-2) ANOVA
##
## data: gwr.adapttricube
## F = 3.3476, df1 = 24.000, df2 = 10.188, p-value = 0.02442
## alternative hypothesis: greater
## sample estimates:
## SS OLS residuals SS GWR residuals
## 784.6649 234.3956
LMZ.F1GWR.test(gwr.adapttricube)
##
## Leung et al. (2000) F(1) test
##
## data: gwr.adapttricube
## F = 0.70367, df1 = 13.821, df2 = 24.000, p-value = 0.2514
## alternative hypothesis: less
## sample estimates:
## SS OLS residuals SS GWR residuals
## 784.6649 234.3956
LMZ.F2GWR.test(gwr.adapttricube)
##
## Leung et al. (2000) F(2) test
##
## data: gwr.adapttricube
## F = 1.2186, df1 = 17.133, df2 = 24.000, p-value = 0.3214
## alternative hypothesis: greater
## sample estimates:
## SS OLS residuals SS GWR improvement
## 784.6649 550.2693
LMZ.F3GWR.test(gwr.adapttricube)
##
## Leung et al. (2000) F(3) test
##
## F statistic Numerator d.f. Denominator d.f. Pr(>)
## (Intercept) 1.037462 18.263316 13.821 0.480751
## X1 0.495737 15.925781 13.821 0.909419
## X2 0.097896 17.607484 13.821 0.999991
## X3 1.108443 18.997745 13.821 0.430276
## X4 0.538095 18.899558 13.821 0.895308
## X5 1.152597 13.501070 13.821 0.397518
## X6 0.544898 17.010480 13.821 0.882500
## X7 4.367443 11.272969 13.821 0.005858 **
## X8 0.137723 12.656045 13.821 0.999432
## X9 3.008855 8.878135 13.821 0.032663 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#menampilkan r-square lokal
gwr.adapttricube.R2=gwr.adapttricube$SDF$localR2
gwr.adapttricube.R2
## [1] 0.7457221 0.8817407 0.7251348 0.7488002 0.8039641 0.7413272 0.8536168
## [8] 0.7570469 0.7555950 0.7937815 0.8486656 0.7706386 0.8738387 0.8736180
## [15] 0.8643033 0.8635137 0.7593481 0.8028899 0.7508645 0.8580441 0.8510684
## [22] 0.8802780 0.8729260 0.8591545 0.8549244 0.7538407 0.8632856 0.8642741
## [29] 0.8573194 0.8631240 0.8531578 0.7494797 0.7542202 0.7493626
#Evaluasi hasil prediksi dan data observasi menggunakan grafik
require (ggplot2)
plot(dt$Y, type="l", col="black")
lines(gwr.adapttricube$SDF$pred, type="l", col="red")
lines(prediksi, type="l", col="blue")
legend("topright",c("Observasi","Prediksi OLS","Prediksi GWR"),
col=c("black","blue","red"), lwd=3)
##Perbandingan Korelasi Antar Prediksi dengan Observasi GWR
obs<-dt$Y
gwr_pred<-gwr.adapttricube$SDF$pred
gwr_pred
## [1] 13.026043 15.431074 18.967046 15.092981 19.036586 21.848706 20.722247
## [8] 19.367227 21.950353 22.543902 20.907567 20.528502 20.239326 29.041367
## [15] 19.891235 14.198778 14.281491 9.550827 13.989971 21.162174 29.223416
## [22] 5.402838 17.088035 12.759062 15.441464 19.197123 14.694963 26.315878
## [29] 29.188688 17.345005 34.214849 12.621374 18.090258 12.803514
cor(prediksi,obs)^2
## [1] 0.4792296
cor(gwr_pred,obs)^2
## [1] 0.8453452
#Perbandingan metode OLS dan GWR berdasarkan AIC dam R2
library(tidyverse)
AIC_OLS <-AIC(regols)
R2_GWR <- (1 - (gwr.adapttricube$results$rss/gwr.adapttricube$gTSS))
R2_OLS <-summary(regols)$r.squared
data.frame("MODEL" = c("GWR","OLS"),
"AIC" = c(gwr.adapttricube[["results"]][["AICh"]],
AIC_OLS),
"R2"=c(R2_GWR,R2_OLS))%>% arrange(AIC)
## MODEL AIC R2
## 1 GWR 183.4615 0.8444351
## 2 OLS 225.2103 0.4792296