Authors

  1. Hasbi Yasin ()
  2. Purhadi ()
  3. Achmad Choiruddin ()

Resource

The data used in this research are secondary data derived from the official website of BPS of Central Java Provinces Indonesia (https://jateng.bps.go.id/)

Response Variables

Y1 Mean of Years Schooling (MYS)

Predictor Variables

X1 GRDP per Capita
X2 Percentage of Poor people
X3 Gender Ratio
X4 Percentage of Households Accessing Proper Sanitation
X5 Labor Force Participation Rate
X6 Teacher to Student Ratio

Library Packages

Before we start the analysis, here are several packages needed to carry out data analysis using Geographically and Temporally Weighted Generalized Gamma Regression (GWMGGR). However, we have to make sure that all the packages have been installed, so that we can call the packages as follows.

#load Packages
library(maxLik)
library(MASS)
library(GWmodel)
library(tseries)
library(EstimationTools) 
library(goftest)
library(lmtest)
library(car)
library(PerformanceAnalytics)

set.seed(123)
options(warn = -1, max.cols = 15, max.rows = 200, max.print = 200)

#Call syntax of related functions
source('List Function UGGD.R')
source('List Function GWUGGD.R')
source('Estimasi Parameter UGGD.R')
source('List Function Uji Asumsi UGGR.R')
source('List Function UGGR.R')
source('List Function GWUGGR.R')
source('List Function GTWUGGR.R')

Data Exploration

Descriptive Statistics

#load data
mydata = read.csv('Data GTWMGGR RLS.csv')
head(mydata)
##    RLS PDRB.Perkapita Kemiskinan Rasio.Gender Akses.Sanitasi  TPAK Rasio.Guru
## 1 6.91          55.65      13.94       100.37          72.74 66.22         17
## 2 7.40          21.11      17.05        99.83          65.88 65.19         19
## 3 6.87          17.04      18.80        97.63          65.89 71.68         19
## 4 6.27          14.97      17.21       100.37          22.55 70.95         15
## 5 7.29          14.93      19.60        99.15          80.17 66.84         18
## 6 7.69          16.83      13.81        97.30          69.38 64.48         15
##        u       v t
## 1 -7.729 108.792 5
## 2 -7.482 109.055 5
## 3 -7.390 108.883 5
## 4 -7.379 109.624 5
## 5 -7.646 109.692 5
## 6 -7.739 109.965 5
y = mydata[,1]
X = mydata[,c(2:7)]

deskripsi = function(y)
{
  desk = cbind(apply(y,2,mean),
               sqrt(apply(y,2,var)),
               apply(y,2,min),
               apply(y,2,max))
  colnames(desk) = c("Mean","Std.Dev","Min","Max")
  rownames(desk) = c(variable.names(y))
  cat("\n-------------------------------------------------\n")
  cat("Descriptive Statistics\n")
  cat("-------------------------------------------------\n")
  print(desk)
  cat("-------------------------------------------------\n\n")
  return(desk)
}
newdata = cbind(y,X)
desk = deskripsi(newdata)
## 
## -------------------------------------------------
## Descriptive Statistics
## -------------------------------------------------
##                     Mean   Std.Dev   Min    Max
## y               7.772857  1.211731  6.18  10.90
## PDRB.Perkapita 28.385600 17.966137 12.37  87.36
## Kemiskinan     11.245429  3.672590  3.98  20.32
## Rasio.Gender   99.373143  2.305603 93.90 103.94
## Akses.Sanitasi 77.954057 17.292396  9.24  98.07
## TPAK           69.369200  3.153160 58.73  76.60
## Rasio.Guru     18.062857  2.934445 13.00  39.00
## -------------------------------------------------

Scatter Plot and Correlation Matrix

# Correlation panel
panel.cor <- function(x, y){
  usr <- par("usr"); on.exit(par(usr))
  par(usr = c(0, 1, 0, 1))
  r <- round(cor(x, y), digits=2)
  txt <- paste0("R = ", r)
  text(0.5, 0.5, txt,cex=1.5)
}
# Customize upper panel
upper.panel<-function(x, y){##Scatter Plot dan Korelasi ####
# Correlation panel
panel.cor <- function(x, y){
  usr <- par("usr"); on.exit(par(usr))
  par(usr = c(0, 1, 0, 1))
  r <- round(cor(x, y), digits=2)
  txt <- paste0("R = ", r)
  text(0.5, 0.5, txt,cex=1.5)
}
# Customize upper panel
upper.panel<-function(x, y){
  points(x,y, pch = 10)
}
# Create the plots
win.graph()
pairs(cbind(y,X), 
      lower.panel = panel.cor,
      upper.panel = upper.panel)

chart.Correlation(cbind(y,X), histogram=TRUE, pch=19)

  points(x,y, pch = 10)
}
# Create the plots
chart.Correlation(cbind(y,X), histogram=TRUE, pch=19)

Fitting Distribution of Response Variables

#Estimasi parameter Distribusi 
est.y = est.uggd(y)
par.y = est.y$parameter
ks.test(y,'pg4gamma',par.y)
## 
##  Asymptotic one-sample Kolmogorov-Smirnov test
## 
## data:  y
## D = 0.066356, p-value = 0.4241
## alternative hypothesis: two-sided
ks.test(y,'pnorm',mean(y),sqrt(var(y)))
## 
##  Asymptotic one-sample Kolmogorov-Smirnov test
## 
## data:  y
## D = 0.15505, p-value = 0.0004435
## alternative hypothesis: two-sided
#Check Distribusi
check = mygof.test(y)
## 
## Kolmogorov-Smirnov Test
##                    Statistic      P-Value
## Normal            0.15523691 0.0004344945
## Gamma             0.13928107 0.0022505556
## Generalized Gamma 0.06635577 0.4240961132
## 
## Anderson-Darling Test
##                   Statistic      P-Value
## Normal             7.360880 0.0002288243
## Gamma              5.597111 0.0014993547
## Generalized Gamma  1.182507 0.2742347829
## 
## Cramer-von Mises Test
##                   Statistic     P-Value
## Normal            1.1347119 0.001164659
## Gamma             0.8467966 0.005588078
## Generalized Gamma 0.1450693 0.405267420
par1 = check$par1
par2 = check$par2
par3 = check$par3
visual.test(y,par1,par2,par3)

Multicollinearity Diagnostic

newdata = cbind(y,X)
head(newdata)
##      y PDRB.Perkapita Kemiskinan Rasio.Gender Akses.Sanitasi  TPAK Rasio.Guru
## 1 6.91          55.65      13.94       100.37          72.74 66.22         17
## 2 7.40          21.11      17.05        99.83          65.88 65.19         19
## 3 6.87          17.04      18.80        97.63          65.89 71.68         19
## 4 6.27          14.97      17.21       100.37          22.55 70.95         15
## 5 7.29          14.93      19.60        99.15          80.17 66.84         18
## 6 7.69          16.83      13.81        97.30          69.38 64.48         15
reg = lm(y~., data = newdata)
vif(reg)
## PDRB.Perkapita     Kemiskinan   Rasio.Gender Akses.Sanitasi           TPAK 
##       1.588189       1.674502       1.364332       1.277016       1.070242 
##     Rasio.Guru 
##       1.209379

At this step, we will identify whether or not there is a case of multicollinearity between the predictors. Based on the VIF value, it can be seen that all predictors have VIF values less than 10. This indicates that there is no case of multicollinearity between the predictor variables.

GGR Model

reg1 = uggr(y,X)
## 
## -------------------------------------------------------------------
##                 Generalized Gamma Regression Model
## -------------------------------------------------------------------
## printed at: 14 Apr 2026 20:33:17 
## created by: Hasbi Yasin
## 
## --- Step 1: Estimasi Parameter UGGD ... !!!
## Optimasi Parameter delta:
## The Best delta: 6.149022 
## 
##  The Best Parameter:
## Loglikelihood : -247.4655 
## Estimates     :
##        estimate    gradient
## lambda 1.166073 0.001282391
## tau    1.249126 0.001133400
## theta  1.527451 0.001031379
## delta  6.149022          NA
## 
## Parameter Univariate Generalized Gamma Distribution:
##        estimate
## Lambda 1.166073
## Tau    1.249126
## Theta  1.527451
## Delta  6.149022
## Log-likelihood UGGD: -247.4655 
## 
## --- Step 2: Estimasi Parameter UGGR ... !!!
## 
## Univariate Generalized Gamma Regression
## Created by: Hasbi Yasin
## 
## Coefficients:
##                     Estimate    Std.Error       Z Value Pr(>|Z|)       Odd
## Intercept       1.3756307370 4.176300e-07 3293898.65256        0 3.9575721
## PDRB.Perkapita  0.0048494186 3.311415e-04      14.64455        0 1.0048612
## Kemiskinan     -0.0056075305 8.574708e-05     -65.39617        0 0.9944082
## Rasio.Gender    0.0060933128 3.184935e-06    1913.16738        0 1.0061119
## Akses.Sanitasi  0.0016363970 4.557187e-05      35.90805        0 1.0016377
## TPAK           -0.0009304218 6.359924e-06    -146.29449        0 0.9990700
## Rasio.Guru     -0.0045356843 2.269693e-04     -19.98369        0 0.9954746
## ---
## Parameter Univariate Generalized Gamma Distribution:
## Lambda: 0.14078 
## Tau   : 11.03599 
## Delta : 6.149022 
## 
## Log-likelihood UGGR: -169.1449 
## 
##     Null Deviance: 494.931 on 171 degrees of freedom
## Residual Deviance: 338.2898 on 165 degrees of freedom
## G2        : 156.6412      Sig.: 0 
## RMSE      : 0.7423215 
## RSquared  : 0.622549 
## Pseudo.RSq: 0.3164911 
## AIC       : 352.2898 
## 
## Number of iterations: 150 
## Required Time:  7.725345 secs

Spatial Heterogeneity Test

This hypothesis testing is intended to test whether spatial factors have a significant influence or not. Formally, spatial heterogeneity can be detected by testing the similarity of the covariance matrix at each location (Johnson and Wichern, 2007).

e = reg1$Residuals #Residual Model UGGR
uji.ST = uji.glejser(e,X)
## Deteksi Heterogenitas Spasial/Spatio-Temporal
## Statistik Uji G2: 83.56788 Sig.: 6.661338e-16

The results of testing spatial heterogeneity obtained a test statistic value of 83.56788 with a p-value of 6.661338e-16, so it can be concluded that there is spatial and temporal heterogeneity in MYS indicator model. Therefore, we improved the model by using the GWMGGR model.

GTWGGR Model

This study proposes the GTWGGR model, which is based on information on the distribution of response variables following the GG distribution and accommodates spatial and temporal effects that affect the relationship mechanism of response variables and predictor variables. This model was applied with the aim of obtaining factors that affect MYS locally in each district/city in Central Java. Modelling is done by involving the geographical coordinates of the central location of the district/city in the parameter estimation. One important factor in the GTWGGR model is the bandwidth used in forming the spatial weight matrix.

GTWGGR using Adaptive Bandwidth

source('Tipe 2 Optimasi bandwidth spatio-temporal GTWUGGR.R')

#Temporal 1
mydata.cord = cbind(mydata$u,mydata$v)
t = mydata$t
opt1.h = bw.gtwuggr(y,X,mydata.cord,t,hT=1, kernel.type = "gaussian")
## 
## Bandwidth optimum pada periode ke: 1 
## h.opt: 1.334043 Deviance score 77.93981 
## h.opt: 1.99604 Deviance score 79.46661 
## h.opt: 0.9249066 Deviance score 75.72708 
## h.opt: 0.6720463 Deviance score 73.25667 
## h.opt: 0.51577 Deviance score 71.14256 
## h.opt: 0.4191859 Deviance score 69.59311 
## h.opt: 0.3594937 Deviance score 68.70733 
## h.opt: 0.3226019 Deviance score 68.27831 
## h.opt: 0.2998015 Deviance score 68.06366 
## h.opt: 0.2857101 Deviance score 67.9478 
## h.opt: 0.2770011 Deviance score 67.88196 
## h.opt: 0.2716186 Deviance score 67.84338 
## h.opt: 0.2682921 Deviance score 67.82033 
## h.opt: 0.2662362 Deviance score 67.80639 
## h.opt: 0.2649656 Deviance score 67.79789 
## h.opt: 0.2641803 Deviance score 67.79268 
## h.opt: 0.2636949 Deviance score 67.78948 
## h.opt: 0.2633616 Deviance score 67.78728 
## h.opt: 0.2633616 Deviance score 67.78728 
## 
## Bandwidth optimum pada periode ke: 2 
## h.opt: 1.334043 Deviance score 77.56351 
## h.opt: 1.99604 Deviance score 79.42125 
## h.opt: 0.9249066 Deviance score 74.88906 
## h.opt: 0.6720463 Deviance score 71.9815 
## h.opt: 0.51577 Deviance score 69.49318 
## h.opt: 0.4191859 Deviance score 67.86939 
## h.opt: 0.3594937 Deviance score 66.91941 
## h.opt: 0.3226019 Deviance score 66.40631 
## h.opt: 0.2998015 Deviance score 66.13313 
## h.opt: 0.2857101 Deviance score 65.98034 
## h.opt: 0.2770011 Deviance score 65.89059 
## h.opt: 0.2716186 Deviance score 65.83641 
## h.opt: 0.2682921 Deviance score 65.80326 
## h.opt: 0.2662362 Deviance score 65.78291 
## h.opt: 0.2649656 Deviance score 65.77034 
## h.opt: 0.2641803 Deviance score 65.76258 
## h.opt: 0.2636949 Deviance score 65.75779 
## h.opt: 0.2633616 Deviance score 65.75452 
## h.opt: 0.2633616 Deviance score 65.75452 
## 
## Bandwidth optimum pada periode ke: 3 
## h.opt: 1.334043 Deviance score 72.69227 
## h.opt: 1.99604 Deviance score 75.21495 
## h.opt: 0.9249066 Deviance score 69.82127 
## h.opt: 0.6720463 Deviance score 67.32113 
## h.opt: 0.51577 Deviance score 64.92549 
## h.opt: 0.4191859 Deviance score 63.03339 
## h.opt: 0.3594937 Deviance score 62.02765 
## h.opt: 0.3226019 Deviance score 61.55658 
## h.opt: 0.2998015 Deviance score 61.3202 
## h.opt: 0.2857101 Deviance score 61.18908 
## h.opt: 0.2770011 Deviance score 61.11214 
## h.opt: 0.2716186 Deviance score 61.06588 
## h.opt: 0.2682921 Deviance score 61.03773 
## h.opt: 0.2662362 Deviance score 61.0205 
## h.opt: 0.2649656 Deviance score 61.00992 
## h.opt: 0.2641803 Deviance score 61.0034 
## h.opt: 0.2636949 Deviance score 60.99939 
## h.opt: 0.2633616 Deviance score 60.99663 
## h.opt: 0.2633616 Deviance score 60.99663 
## 
## Bandwidth optimum pada periode ke: 4 
## h.opt: 1.334043 Deviance score 97.02736 
## h.opt: 1.99604 Deviance score 98.82604 
## h.opt: 0.9249066 Deviance score 88.11094 
## h.opt: 0.6720463 Deviance score 70.45119 
## h.opt: 0.51577 Deviance score 66.13665 
## h.opt: 0.4601735 Deviance score 65.05027 
## h.opt: 0.3848254 Deviance score 64.10286 
## h.opt: 0.304336 Deviance score 61.22249 
## h.opt: 0.3350802 Deviance score 62.86232 
## h.opt: 0.2885125 Deviance score 60.24132 
## h.opt: 0.2787331 Deviance score 59.64686 
## h.opt: 0.2726891 Deviance score 59.29449 
## h.opt: 0.2689537 Deviance score 59.08425 
## h.opt: 0.2666451 Deviance score 58.95751 
## h.opt: 0.2652183 Deviance score 58.88045 
## h.opt: 0.2643365 Deviance score 58.83333 
## h.opt: 0.2637915 Deviance score 58.8044 
## h.opt: 0.2634546 Deviance score 58.7866 
## h.opt: 0.2634546 Deviance score 58.7866 
## 
## Bandwidth optimum pada periode ke: 5 
## h.opt: 1.334043 Deviance score 99.18755 
## h.opt: 1.99604 Deviance score 101.0736 
## h.opt: 0.9249066 Deviance score 97.36787 
## h.opt: 0.6720463 Deviance score 95.05511 
## h.opt: 0.51577 Deviance score 73.64319 
## h.opt: 0.4191859 Deviance score 64.30614 
## h.opt: 0.3594937 Deviance score 61.60667 
## h.opt: 0.3206582 Deviance score 63.00115 
## h.opt: 0.3618795 Deviance score 61.64671 
## h.opt: 0.3541215 Deviance score 61.55308 
## h.opt: 0.3413397 Deviance score 61.68178 
## h.opt: 0.3511248 Deviance score 61.54796 
## h.opt: 0.3517587 Deviance score 61.54744 
## h.opt: 0.352092 Deviance score 61.54752 
## h.opt: 0.3517587 Deviance score 61.54744 
## 
## Bandwidth Temporal       : 1 
## Bandwidth Spasial Optimum: 0.2633616 0.2633616 0.2633616 0.2634546 0.3517587 
## Objective                : 314.8725
hS1 = opt1.h$bandwidth
#run model GWUGGR
gtwuggr2.gauss1 = gtwuggr(y,X,coord = mydata.cord,t=t,hT=1,hS=hS1,
                         kernel.type ="gaussian")
## 
## -------------------------------------------------------------------
## Geographically and Temporally Weighted Generalized Gamma Regression Model
## -------------------------------------------------------------------
## printed at: 14 Apr 2026 20:33:53 
## created by: Hasbi Yasin
## 
## --- Step 1: Estimasi Parameter UGGD ... !!!
## 
## Parameter Model Univariate Generalized Gamma Distribution:
##        estimate
## lambda 1.166073
## tau    1.249126
## theta  1.527451
## delta  6.149022
## 
## Log-likelihood UGGD: -247.4655 
## Deviance UGGD      : 494.931 
## 
## --- Step 2: Estimasi Parameter Model UGGR ... !!!
##                     estimate
## Intercept       1.3756307370
## PDRB.Perkapita  0.0048494186
## Kemiskinan     -0.0056075305
## Rasio.Gender    0.0060933128
## Akses.Sanitasi  0.0016363970
## TPAK           -0.0009304218
## Rasio.Guru     -0.0045356843
## lambda          0.1407800239
## tau            11.0359896298
## delta           6.1490221227
## 
## Log-likelihood UGGR: -169.1449 
## Deviance UGGR      : 338.2898 
## 
## --- Step 3: Estimasi Parameter GTWUGGR (Null Model) ... !!!
## Estimasi Parameter GTWUGGR (Null Model) Lokasi ke:
## 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  
## 
## Summary Paramater GTWUGGR (Null Model):
##         Intercept   lambda       tau    delta
## Min.     1.975528 1.166073 0.7971548 6.149022
## 1st Qu.  2.008384 1.166073 1.3170682 6.149022
## Median   2.059511 1.166073 1.7610823 6.149022
## Mean     2.075295 1.166073 1.6742859 6.149022
## 3rd Qu.  2.145044 1.166073 1.9283957 6.149022
## Max.     2.170787 1.166073 3.1669927 6.149022
## 
## Log-likelihood GTWUGGR (Null Model): -201.9651 
## Deviance GTWUGGR (Null Model)      : 403.9302 
## 
## --- Step 4: Estimasi Parameter Model GTWUGGR ... !!!
## Estimasi Parameter Model GTWUGGR Lokasi ke:
## 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  
## 
## Geographically and Temporally Weighted Univariate Generalized Gamma Regression
## Created by: Hasbi Yasin
## ---
## Summary Parameter Model GTWUGGR:
##          Intercept PDRB.Perkapita   Kemiskinan  Rasio.Gender Akses.Sanitasi
## Min.    -0.7375848  -0.0009101833 -0.015264495 -0.0144729512    0.001186534
## 1st Qu.  1.4769012   0.0036078668 -0.008868378 -0.0066217342    0.001413993
## Median   2.0008720   0.0047732397 -0.006143648 -0.0013598736    0.001727537
## Mean     1.9480396   0.0049732857 -0.006134750  0.0003574254    0.001942193
## 3rd Qu.  2.5718238   0.0053957953 -0.003574780  0.0035312124    0.002388772
## Max.     3.5987150   0.0154373411  0.003430976  0.0240244167    0.003470935
##                 TPAK   Rasio.Guru  lambda       tau    delta
## Min.    -0.010377380 -0.009187062 0.14078  9.749568 6.149022
## 1st Qu. -0.003572812 -0.005868180 0.14078 12.173085 6.149022
## Median  -0.001855620 -0.004297445 0.14078 15.246157 6.149022
## Mean    -0.001073529 -0.003985341 0.14078 17.487008 6.149022
## 3rd Qu.  0.002273923 -0.003373112 0.14078 22.230965 6.149022
## Max.     0.006381358  0.005805235 0.14078 35.795726 6.149022
## ---
## Log-likelihood Model GTWUGGR    : -99.79994 
## Deviance Model GTWUGGR          : 199.5999 
## Number of Effective Parameters  : 30.6785 
## 
## G2 UGGR    : 156.6412 on 6 degrees of freedom
## G2 GTWUGGR : 204.3303 on 30.6785 degrees of freedom   Sig.: 0 
## FStat     : 3.919731      Sig.: 0.005057817 
## Bandwidth Spasial : 0.2633616 0.2633616 0.2633616 0.2634546 0.3517587 
## Bandwidth Temporal: 1 
## RMSE      : 0.4390319 
## GCV       : 0.2834042 
## RSquared  : 0.8679712 
## Pseudo.RSq: 0.5058555 
## AIC       : 405.2784 
## 
## Required Time:  1.948169 mins
#Temporal 2
opt2.h = bw.gtwuggr(y,X,mydata.cord,t,hT=2, kernel.type = "gaussian")
## 
## Bandwidth optimum pada periode ke: 1 
## h.opt: 1.334043 Deviance score 77.93981 
## h.opt: 1.99604 Deviance score 79.46661 
## h.opt: 0.9249066 Deviance score 75.72708 
## h.opt: 0.6720463 Deviance score 73.25667 
## h.opt: 0.51577 Deviance score 71.14256 
## h.opt: 0.4191859 Deviance score 69.59311 
## h.opt: 0.3594937 Deviance score 68.70733 
## h.opt: 0.3226019 Deviance score 68.27831 
## h.opt: 0.2998015 Deviance score 68.06366 
## h.opt: 0.2857101 Deviance score 67.9478 
## h.opt: 0.2770011 Deviance score 67.88196 
## h.opt: 0.2716186 Deviance score 67.84338 
## h.opt: 0.2682921 Deviance score 67.82033 
## h.opt: 0.2662362 Deviance score 67.80639 
## h.opt: 0.2649656 Deviance score 67.79789 
## h.opt: 0.2641803 Deviance score 67.79268 
## h.opt: 0.2636949 Deviance score 67.78948 
## h.opt: 0.2633616 Deviance score 67.78728 
## h.opt: 0.2633616 Deviance score 67.78728 
## 
## Bandwidth optimum pada periode ke: 2 
## h.opt: 1.334043 Deviance score 77.56351 
## h.opt: 1.99604 Deviance score 79.42125 
## h.opt: 0.9249066 Deviance score 74.88906 
## h.opt: 0.6720463 Deviance score 71.9815 
## h.opt: 0.51577 Deviance score 69.49318 
## h.opt: 0.4191859 Deviance score 67.86939 
## h.opt: 0.3594937 Deviance score 66.91941 
## h.opt: 0.3226019 Deviance score 66.40631 
## h.opt: 0.2998015 Deviance score 66.13313 
## h.opt: 0.2857101 Deviance score 65.98034 
## h.opt: 0.2770011 Deviance score 65.89059 
## h.opt: 0.2716186 Deviance score 65.83641 
## h.opt: 0.2682921 Deviance score 65.80327 
## h.opt: 0.2662362 Deviance score 65.7829 
## h.opt: 0.2649656 Deviance score 65.77033 
## h.opt: 0.2641803 Deviance score 65.76259 
## h.opt: 0.2636949 Deviance score 65.75781 
## h.opt: 0.2633616 Deviance score 65.7545 
## h.opt: 0.2633616 Deviance score 65.7545 
## 
## Bandwidth optimum pada periode ke: 3 
## h.opt: 1.334043 Deviance score 72.69227 
## h.opt: 1.99604 Deviance score 75.21495 
## h.opt: 0.9249066 Deviance score 69.82127 
## h.opt: 0.6720463 Deviance score 67.32113 
## h.opt: 0.51577 Deviance score 64.92549 
## h.opt: 0.4191859 Deviance score 63.03339 
## h.opt: 0.3594937 Deviance score 62.02765 
## h.opt: 0.3226019 Deviance score 61.55658 
## h.opt: 0.2998015 Deviance score 61.3202 
## h.opt: 0.2857101 Deviance score 61.18908 
## h.opt: 0.2770011 Deviance score 61.11214 
## h.opt: 0.2716186 Deviance score 61.06588 
## h.opt: 0.2682921 Deviance score 61.03773 
## h.opt: 0.2662362 Deviance score 61.0205 
## h.opt: 0.2649656 Deviance score 61.00992 
## h.opt: 0.2641803 Deviance score 61.0034 
## h.opt: 0.2636949 Deviance score 60.99939 
## h.opt: 0.2633616 Deviance score 60.99663 
## h.opt: 0.2633616 Deviance score 60.99663 
## 
## Bandwidth optimum pada periode ke: 4 
## h.opt: 1.334043 Deviance score 97.02736 
## h.opt: 1.99604 Deviance score 98.82604 
## h.opt: 0.9249066 Deviance score 88.11094 
## h.opt: 0.6720463 Deviance score 70.45119 
## h.opt: 0.51577 Deviance score 66.13665 
## h.opt: 0.4601735 Deviance score 65.05027 
## h.opt: 0.3848254 Deviance score 64.10286 
## h.opt: 0.304336 Deviance score 61.22249 
## h.opt: 0.3350802 Deviance score 62.86232 
## h.opt: 0.2885125 Deviance score 60.24132 
## h.opt: 0.2787331 Deviance score 59.64686 
## h.opt: 0.2726891 Deviance score 59.29449 
## h.opt: 0.2689537 Deviance score 59.08425 
## h.opt: 0.2666451 Deviance score 58.95751 
## h.opt: 0.2652183 Deviance score 58.88045 
## h.opt: 0.2643365 Deviance score 58.83333 
## h.opt: 0.2637915 Deviance score 58.8044 
## h.opt: 0.2634546 Deviance score 58.7866 
## h.opt: 0.2634546 Deviance score 58.7866 
## 
## Bandwidth optimum pada periode ke: 5 
## h.opt: 1.334043 Deviance score 99.18755 
## h.opt: 1.99604 Deviance score 101.0736 
## h.opt: 0.9249066 Deviance score 97.36787 
## h.opt: 0.6720463 Deviance score 95.05511 
## h.opt: 0.51577 Deviance score 73.64319 
## h.opt: 0.4191859 Deviance score 64.30614 
## h.opt: 0.3594937 Deviance score 61.60667 
## h.opt: 0.3206582 Deviance score 63.00115 
## h.opt: 0.3618795 Deviance score 61.64671 
## h.opt: 0.3541215 Deviance score 61.55308 
## h.opt: 0.3413397 Deviance score 61.68178 
## h.opt: 0.3511248 Deviance score 61.54796 
## h.opt: 0.3517587 Deviance score 61.54744 
## h.opt: 0.352092 Deviance score 61.54752 
## h.opt: 0.3517587 Deviance score 61.54744 
## 
## Bandwidth Temporal       : 2 
## Bandwidth Spasial Optimum: 0.2633616 0.2633616 0.2633616 0.2634546 0.3517587 
## Objective                : 314.8724
hS2 = opt2.h$bandwidth
#run model GWUGGR
gtwuggr2.gauss2 = gtwuggr(y,X,coord = mydata.cord,t=t,hT=2,hS=hS2,
                         kernel.type ="gaussian")
## 
## -------------------------------------------------------------------
## Geographically and Temporally Weighted Generalized Gamma Regression Model
## -------------------------------------------------------------------
## printed at: 14 Apr 2026 20:36:19 
## created by: Hasbi Yasin
## 
## --- Step 1: Estimasi Parameter UGGD ... !!!
## 
## Parameter Model Univariate Generalized Gamma Distribution:
##        estimate
## lambda 1.166073
## tau    1.249126
## theta  1.527451
## delta  6.149022
## 
## Log-likelihood UGGD: -247.4655 
## Deviance UGGD      : 494.931 
## 
## --- Step 2: Estimasi Parameter Model UGGR ... !!!
##                     estimate
## Intercept       1.3756307370
## PDRB.Perkapita  0.0048494186
## Kemiskinan     -0.0056075305
## Rasio.Gender    0.0060933128
## Akses.Sanitasi  0.0016363970
## TPAK           -0.0009304218
## Rasio.Guru     -0.0045356843
## lambda          0.1407800239
## tau            11.0359896298
## delta           6.1490221227
## 
## Log-likelihood UGGR: -169.1449 
## Deviance UGGR      : 338.2898 
## 
## --- Step 3: Estimasi Parameter GTWUGGR (Null Model) ... !!!
## Estimasi Parameter GTWUGGR (Null Model) Lokasi ke:
## 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  
## 
## Summary Paramater GTWUGGR (Null Model):
##         Intercept   lambda       tau    delta
## Min.     1.968563 1.166073 0.7492665 6.149022
## 1st Qu.  1.994578 1.166073 1.2500443 6.149022
## Median   2.046121 1.166073 1.6696008 6.149022
## Mean     2.066265 1.166073 1.6286454 6.149022
## 3rd Qu.  2.139244 1.166073 1.8998683 6.149022
## Max.     2.165614 1.166073 3.2231132 6.149022
## 
## Log-likelihood GTWUGGR (Null Model): -195.2331 
## Deviance GTWUGGR (Null Model)      : 390.4662 
## 
## --- Step 4: Estimasi Parameter Model GTWUGGR ... !!!
## Estimasi Parameter Model GTWUGGR Lokasi ke:
## 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  
## 
## Geographically and Temporally Weighted Univariate Generalized Gamma Regression
## Created by: Hasbi Yasin
## ---
## Summary Parameter Model GTWUGGR:
##         Intercept PDRB.Perkapita   Kemiskinan Rasio.Gender Akses.Sanitasi
## Min.    0.3956712   0.0008472441 -0.010844530 -0.002053977   0.0007716101
## 1st Qu. 1.1664935   0.0049195068 -0.004691745  0.003631823   0.0016887123
## Median  1.3813794   0.0056487016 -0.003226386  0.005113811   0.0019343603
## Mean    1.3522318   0.0066509126 -0.003107434  0.005352953   0.0020563461
## 3rd Qu. 1.6345271   0.0067458692 -0.001093005  0.007170534   0.0022409729
## Max.    2.0144266   0.0177750647  0.003421812  0.018384630   0.0051418275
##                  TPAK   Rasio.Guru  lambda       tau    delta
## Min.    -0.0157796298 -0.007477279 0.14078  6.544579 6.149022
## 1st Qu. -0.0029450456 -0.005098662 0.14078 11.972797 6.149022
## Median  -0.0007590764 -0.003992586 0.14078 15.762014 6.149022
## Mean    -0.0010384572 -0.003347812 0.14078 17.261652 6.149022
## 3rd Qu.  0.0024317755 -0.001674294 0.14078 22.106414 6.149022
## Max.     0.0056659160  0.007674876 0.14078 33.085178 6.149022
## ---
## Log-likelihood Model GTWUGGR    : -82.13634 
## Deviance Model GTWUGGR          : 164.2727 
## Number of Effective Parameters  : 34.60583 
## 
## G2 UGGR    : 156.6412 on 6 degrees of freedom
## G2 GTWUGGR : 226.1935 on 34.60583 degrees of freedom      Sig.: 0 
## FStat     : 3.994146      Sig.: 0.003843108 
## Bandwidth Spasial : 0.2633616 0.2633616 0.2633616 0.2634546 0.3517587 
## Bandwidth Temporal: 2 
## RMSE      : 0.4873408 
## GCV       : 0.3690146 
## RSquared  : 0.8373171 
## Pseudo.RSq: 0.5792909 
## AIC       : 373.8785 
## 
## Required Time:  2.046705 mins
#Temporal 3
opt3.h = bw.gtwuggr(y,X,mydata.cord,t,hT=3, kernel.type = "gaussian")
## 
## Bandwidth optimum pada periode ke: 1 
## h.opt: 1.334043 Deviance score 77.93981 
## h.opt: 1.99604 Deviance score 79.46661 
## h.opt: 0.9249066 Deviance score 75.72708 
## h.opt: 0.6720463 Deviance score 73.25667 
## h.opt: 0.51577 Deviance score 71.14256 
## h.opt: 0.4191859 Deviance score 69.59311 
## h.opt: 0.3594937 Deviance score 68.70733 
## h.opt: 0.3226019 Deviance score 68.27831 
## h.opt: 0.2998015 Deviance score 68.06366 
## h.opt: 0.2857101 Deviance score 67.9478 
## h.opt: 0.2770011 Deviance score 67.88196 
## h.opt: 0.2716186 Deviance score 67.84338 
## h.opt: 0.2682921 Deviance score 67.82033 
## h.opt: 0.2662362 Deviance score 67.80639 
## h.opt: 0.2649656 Deviance score 67.79789 
## h.opt: 0.2641803 Deviance score 67.79268 
## h.opt: 0.2636949 Deviance score 67.78948 
## h.opt: 0.2633616 Deviance score 67.78728 
## h.opt: 0.2633616 Deviance score 67.78728 
## 
## Bandwidth optimum pada periode ke: 2 
## h.opt: 1.334043 Deviance score 77.56351 
## h.opt: 1.99604 Deviance score 79.42125 
## h.opt: 0.9249066 Deviance score 74.88906 
## h.opt: 0.6720463 Deviance score 71.9815 
## h.opt: 0.51577 Deviance score 69.49318 
## h.opt: 0.4191859 Deviance score 67.86939 
## h.opt: 0.3594937 Deviance score 66.91941 
## h.opt: 0.3226019 Deviance score 66.40631 
## h.opt: 0.2998015 Deviance score 66.13313 
## h.opt: 0.2857101 Deviance score 65.98034 
## h.opt: 0.2770011 Deviance score 65.89059 
## h.opt: 0.2716186 Deviance score 65.8364 
## h.opt: 0.2682921 Deviance score 65.80327 
## h.opt: 0.2662362 Deviance score 65.78288 
## h.opt: 0.2649656 Deviance score 65.77033 
## h.opt: 0.2641803 Deviance score 65.76258 
## h.opt: 0.2636949 Deviance score 65.75779 
## h.opt: 0.2633616 Deviance score 65.75452 
## h.opt: 0.2633616 Deviance score 65.75452 
## 
## Bandwidth optimum pada periode ke: 3 
## h.opt: 1.334043 Deviance score 72.69227 
## h.opt: 1.99604 Deviance score 75.21495 
## h.opt: 0.9249066 Deviance score 69.82127 
## h.opt: 0.6720463 Deviance score 67.32113 
## h.opt: 0.51577 Deviance score 64.92549 
## h.opt: 0.4191859 Deviance score 63.03339 
## h.opt: 0.3594937 Deviance score 62.02765 
## h.opt: 0.3226019 Deviance score 61.55658 
## h.opt: 0.2998015 Deviance score 61.3202 
## h.opt: 0.2857101 Deviance score 61.18908 
## h.opt: 0.2770011 Deviance score 61.11214 
## h.opt: 0.2716186 Deviance score 61.06588 
## h.opt: 0.2682921 Deviance score 61.03773 
## h.opt: 0.2662362 Deviance score 61.0205 
## h.opt: 0.2649656 Deviance score 61.00992 
## h.opt: 0.2641803 Deviance score 61.0034 
## h.opt: 0.2636949 Deviance score 60.99939 
## h.opt: 0.2633616 Deviance score 60.99663 
## h.opt: 0.2633616 Deviance score 60.99663 
## 
## Bandwidth optimum pada periode ke: 4 
## h.opt: 1.334043 Deviance score 97.02736 
## h.opt: 1.99604 Deviance score 98.82604 
## h.opt: 0.9249066 Deviance score 88.11094 
## h.opt: 0.6720463 Deviance score 70.45119 
## h.opt: 0.51577 Deviance score 66.13665 
## h.opt: 0.4601735 Deviance score 65.05027 
## h.opt: 0.3848254 Deviance score 64.10286 
## h.opt: 0.304336 Deviance score 61.22249 
## h.opt: 0.3350802 Deviance score 62.86232 
## h.opt: 0.2885125 Deviance score 60.24132 
## h.opt: 0.2787331 Deviance score 59.64686 
## h.opt: 0.2726891 Deviance score 59.29449 
## h.opt: 0.2689537 Deviance score 59.08425 
## h.opt: 0.2666451 Deviance score 58.95751 
## h.opt: 0.2652183 Deviance score 58.88045 
## h.opt: 0.2643365 Deviance score 58.83333 
## h.opt: 0.2637915 Deviance score 58.8044 
## h.opt: 0.2634546 Deviance score 58.7866 
## h.opt: 0.2634546 Deviance score 58.7866 
## 
## Bandwidth optimum pada periode ke: 5 
## h.opt: 1.334043 Deviance score 99.18755 
## h.opt: 1.99604 Deviance score 101.0736 
## h.opt: 0.9249066 Deviance score 97.36787 
## h.opt: 0.6720463 Deviance score 95.05511 
## h.opt: 0.51577 Deviance score 73.64319 
## h.opt: 0.4191859 Deviance score 64.30614 
## h.opt: 0.3594937 Deviance score 61.60667 
## h.opt: 0.3206582 Deviance score 63.00115 
## h.opt: 0.3618795 Deviance score 61.64671 
## h.opt: 0.3541215 Deviance score 61.55308 
## h.opt: 0.3413397 Deviance score 61.68178 
## h.opt: 0.3511248 Deviance score 61.54796 
## h.opt: 0.3517587 Deviance score 61.54744 
## h.opt: 0.352092 Deviance score 61.54752 
## h.opt: 0.3517587 Deviance score 61.54744 
## 
## Bandwidth Temporal       : 3 
## Bandwidth Spasial Optimum: 0.2633616 0.2633616 0.2633616 0.2634546 0.3517587 
## Objective                : 314.8725
hS3 = opt3.h$bandwidth
#run model GWUGGR
gtwuggr2.gauss3 = gtwuggr(y,X,coord = mydata.cord,t=t,hT=3,hS=hS3,
                         kernel.type ="gaussian")
## 
## -------------------------------------------------------------------
## Geographically and Temporally Weighted Generalized Gamma Regression Model
## -------------------------------------------------------------------
## printed at: 14 Apr 2026 20:38:49 
## created by: Hasbi Yasin
## 
## --- Step 1: Estimasi Parameter UGGD ... !!!
## 
## Parameter Model Univariate Generalized Gamma Distribution:
##        estimate
## lambda 1.166073
## tau    1.249126
## theta  1.527451
## delta  6.149022
## 
## Log-likelihood UGGD: -247.4655 
## Deviance UGGD      : 494.931 
## 
## --- Step 2: Estimasi Parameter Model UGGR ... !!!
##                     estimate
## Intercept       1.3756307370
## PDRB.Perkapita  0.0048494186
## Kemiskinan     -0.0056075305
## Rasio.Gender    0.0060933128
## Akses.Sanitasi  0.0016363970
## TPAK           -0.0009304218
## Rasio.Guru     -0.0045356843
## lambda          0.1407800239
## tau            11.0359896298
## delta           6.1490221227
## 
## Log-likelihood UGGR: -169.1449 
## Deviance UGGR      : 338.2898 
## 
## --- Step 3: Estimasi Parameter GTWUGGR (Null Model) ... !!!
## Estimasi Parameter GTWUGGR (Null Model) Lokasi ke:
## 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  
## 
## Summary Paramater GTWUGGR (Null Model):
##         Intercept   lambda       tau    delta
## Min.     1.965279 1.166073 0.7259566 6.149022
## 1st Qu.  1.987423 1.166073 1.2074872 6.149022
## Median   2.039673 1.166073 1.6417251 6.149022
## Mean     2.061353 1.166073 1.5957528 6.149022
## 3rd Qu.  2.135151 1.166073 1.8604470 6.149022
## Max.     2.161910 1.166073 3.2391130 6.149022
## 
## Log-likelihood GTWUGGR (Null Model): -192.9385 
## Deviance GTWUGGR (Null Model)      : 385.877 
## 
## --- Step 4: Estimasi Parameter Model GTWUGGR ... !!!
## Estimasi Parameter Model GTWUGGR Lokasi ke:
## 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  Error in qr.solve(H[!fixed, !fixed, drop = FALSE], G0[!fixed], tol = slot(control,  : 
##   singular matrix 'a' in solve
## 17  18  19  20  Error in qr.solve(H[!fixed, !fixed, drop = FALSE], G0[!fixed], tol = slot(control,  : 
##   singular matrix 'a' in solve
## 21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  Error in qr.solve(H[!fixed, !fixed, drop = FALSE], G0[!fixed], tol = slot(control,  : 
##   singular matrix 'a' in solve
## 
## 
## Geographically and Temporally Weighted Univariate Generalized Gamma Regression
## Created by: Hasbi Yasin
## ---
## Summary Parameter Model GTWUGGR:
##         Intercept PDRB.Perkapita   Kemiskinan  Rasio.Gender Akses.Sanitasi
## Min.    0.4442904    0.002202184 -0.011427400 -0.0008287367   0.0006567333
## 1st Qu. 1.0093525    0.004904651 -0.006186343  0.0047036157   0.0017124521
## Median  1.2496364    0.005796346 -0.002757414  0.0073230996   0.0019340173
## Mean    1.1944148    0.006442279 -0.003579064  0.0069252282   0.0021166690
## 3rd Qu. 1.4339910    0.006426793 -0.001562957  0.0093528082   0.0022656319
## Max.    1.8976173    0.018681504  0.005746090  0.0171531626   0.0056178795
##                 TPAK   Rasio.Guru  lambda       tau    delta
## Min.    -0.015590865 -0.006794675 0.14078  6.243395 6.149022
## 1st Qu. -0.003170095 -0.005148408 0.14078 11.447162 6.149022
## Median  -0.001149252 -0.004152125 0.14078 16.175647 6.149022
## Mean    -0.000929443 -0.003606507 0.14078 17.032007 6.149022
## 3rd Qu.  0.002443986 -0.002962277 0.14078 20.854242 6.149022
## Max.     0.010134300  0.004012137 0.14078 32.788584 6.149022
## ---
## Log-likelihood Model GTWUGGR    : -73.04435 
## Deviance Model GTWUGGR          : 146.0887 
## Number of Effective Parameters  : 36.44433 
## 
## G2 UGGR    : 156.6412 on 6 degrees of freedom
## G2 GTWUGGR : 239.7883 on 36.44433 degrees of freedom      Sig.: 0 
## FStat     : 3.967864      Sig.: 0.003733957 
## Bandwidth Spasial : 0.2633616 0.2633616 0.2633616 0.2634546 0.3517587 
## Bandwidth Temporal: 3 
## RMSE      : 0.4692403 
## GCV       : 0.3512514 
## RSquared  : 0.8491772 
## Pseudo.RSq: 0.6214113 
## AIC       : 357.533 
## 
## Required Time:  2.577108 mins
#Temporal 4
opt4.h = bw.gtwuggr(y,X,mydata.cord,t,hT=4, kernel.type = "gaussian")
## 
## Bandwidth optimum pada periode ke: 1 
## h.opt: 1.334043 Deviance score 77.93981 
## h.opt: 1.99604 Deviance score 79.46661 
## h.opt: 0.9249066 Deviance score 75.72708 
## h.opt: 0.6720463 Deviance score 73.25667 
## h.opt: 0.51577 Deviance score 71.14256 
## h.opt: 0.4191859 Deviance score 69.59311 
## h.opt: 0.3594937 Deviance score 68.70733 
## h.opt: 0.3226019 Deviance score 68.27831 
## h.opt: 0.2998015 Deviance score 68.06366 
## h.opt: 0.2857101 Deviance score 67.9478 
## h.opt: 0.2770011 Deviance score 67.88196 
## h.opt: 0.2716186 Deviance score 67.84338 
## h.opt: 0.2682921 Deviance score 67.82033 
## h.opt: 0.2662362 Deviance score 67.80639 
## h.opt: 0.2649656 Deviance score 67.79789 
## h.opt: 0.2641803 Deviance score 67.79268 
## h.opt: 0.2636949 Deviance score 67.78948 
## h.opt: 0.2633616 Deviance score 67.78728 
## h.opt: 0.2633616 Deviance score 67.78728 
## 
## Bandwidth optimum pada periode ke: 2 
## h.opt: 1.334043 Deviance score 77.56351 
## h.opt: 1.99604 Deviance score 79.42125 
## h.opt: 0.9249066 Deviance score 74.88906 
## h.opt: 0.6720463 Deviance score 71.9815 
## h.opt: 0.51577 Deviance score 69.49318 
## h.opt: 0.4191859 Deviance score 67.86939 
## h.opt: 0.3594937 Deviance score 66.91941 
## h.opt: 0.3226019 Deviance score 66.40631 
## h.opt: 0.2998015 Deviance score 66.13313 
## h.opt: 0.2857101 Deviance score 65.98034 
## h.opt: 0.2770011 Deviance score 65.89059 
## h.opt: 0.2716186 Deviance score 65.8364 
## h.opt: 0.2682921 Deviance score 65.80327 
## h.opt: 0.2662362 Deviance score 65.78289 
## h.opt: 0.2649656 Deviance score 65.77032 
## h.opt: 0.2641803 Deviance score 65.76257 
## h.opt: 0.2636949 Deviance score 65.75779 
## h.opt: 0.2633616 Deviance score 65.7545 
## h.opt: 0.2633616 Deviance score 65.7545 
## 
## Bandwidth optimum pada periode ke: 3 
## h.opt: 1.334043 Deviance score 72.69227 
## h.opt: 1.99604 Deviance score 75.21495 
## h.opt: 0.9249066 Deviance score 69.82127 
## h.opt: 0.6720463 Deviance score 67.32113 
## h.opt: 0.51577 Deviance score 64.92549 
## h.opt: 0.4191859 Deviance score 63.03339 
## h.opt: 0.3594937 Deviance score 62.02765 
## h.opt: 0.3226019 Deviance score 61.55658 
## h.opt: 0.2998015 Deviance score 61.3202 
## h.opt: 0.2857101 Deviance score 61.18908 
## h.opt: 0.2770011 Deviance score 61.11214 
## h.opt: 0.2716186 Deviance score 61.06588 
## h.opt: 0.2682921 Deviance score 61.03773 
## h.opt: 0.2662362 Deviance score 61.0205 
## h.opt: 0.2649656 Deviance score 61.00992 
## h.opt: 0.2641803 Deviance score 61.0034 
## h.opt: 0.2636949 Deviance score 60.99939 
## h.opt: 0.2633616 Deviance score 60.99663 
## h.opt: 0.2633616 Deviance score 60.99663 
## 
## Bandwidth optimum pada periode ke: 4 
## h.opt: 1.334043 Deviance score 97.02736 
## h.opt: 1.99604 Deviance score 98.82604 
## h.opt: 0.9249066 Deviance score 88.11094 
## h.opt: 0.6720463 Deviance score 70.45119 
## h.opt: 0.51577 Deviance score 66.13665 
## h.opt: 0.4601735 Deviance score 65.05027 
## h.opt: 0.3848254 Deviance score 64.10286 
## h.opt: 0.304336 Deviance score 61.22249 
## h.opt: 0.3350802 Deviance score 62.86232 
## h.opt: 0.2885125 Deviance score 60.24132 
## h.opt: 0.2787331 Deviance score 59.64686 
## h.opt: 0.2726891 Deviance score 59.29449 
## h.opt: 0.2689537 Deviance score 59.08425 
## h.opt: 0.2666451 Deviance score 58.95751 
## h.opt: 0.2652183 Deviance score 58.88045 
## h.opt: 0.2643365 Deviance score 58.83333 
## h.opt: 0.2637915 Deviance score 58.8044 
## h.opt: 0.2634546 Deviance score 58.7866 
## h.opt: 0.2634546 Deviance score 58.7866 
## 
## Bandwidth optimum pada periode ke: 5 
## h.opt: 1.334043 Deviance score 99.18755 
## h.opt: 1.99604 Deviance score 101.0736 
## h.opt: 0.9249066 Deviance score 97.36787 
## h.opt: 0.6720463 Deviance score 95.05511 
## h.opt: 0.51577 Deviance score 73.64319 
## h.opt: 0.4191859 Deviance score 64.30614 
## h.opt: 0.3594937 Deviance score 61.60667 
## h.opt: 0.3206582 Deviance score 63.00115 
## h.opt: 0.3618795 Deviance score 61.64671 
## h.opt: 0.3541215 Deviance score 61.55308 
## h.opt: 0.3413397 Deviance score 61.68178 
## h.opt: 0.3511248 Deviance score 61.54796 
## h.opt: 0.3517587 Deviance score 61.54744 
## h.opt: 0.352092 Deviance score 61.54752 
## h.opt: 0.3517587 Deviance score 61.54744 
## 
## Bandwidth Temporal       : 4 
## Bandwidth Spasial Optimum: 0.2633616 0.2633616 0.2633616 0.2634546 0.3517587 
## Objective                : 314.8725
hS4 = opt4.h$bandwidth
#run model GTWGGR
gtwuggr2.gauss4 = gtwuggr(y,X,coord = mydata.cord,t=t,hT=4,hS=hS4,
                         kernel.type ="gaussian")
## 
## -------------------------------------------------------------------
## Geographically and Temporally Weighted Generalized Gamma Regression Model
## -------------------------------------------------------------------
## printed at: 14 Apr 2026 20:41:39 
## created by: Hasbi Yasin
## 
## --- Step 1: Estimasi Parameter UGGD ... !!!
## 
## Parameter Model Univariate Generalized Gamma Distribution:
##        estimate
## lambda 1.166073
## tau    1.249126
## theta  1.527451
## delta  6.149022
## 
## Log-likelihood UGGD: -247.4655 
## Deviance UGGD      : 494.931 
## 
## --- Step 2: Estimasi Parameter Model UGGR ... !!!
##                     estimate
## Intercept       1.3756307370
## PDRB.Perkapita  0.0048494186
## Kemiskinan     -0.0056075305
## Rasio.Gender    0.0060933128
## Akses.Sanitasi  0.0016363970
## TPAK           -0.0009304218
## Rasio.Guru     -0.0045356843
## lambda          0.1407800239
## tau            11.0359896298
## delta           6.1490221227
## 
## Log-likelihood UGGR: -169.1449 
## Deviance UGGR      : 338.2898 
## 
## --- Step 3: Estimasi Parameter GTWUGGR (Null Model) ... !!!
## Estimasi Parameter GTWUGGR (Null Model) Lokasi ke:
## 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  
## 
## Summary Paramater GTWUGGR (Null Model):
##         Intercept   lambda       tau    delta
## Min.     1.963849 1.166073 0.7162823 6.149022
## 1st Qu.  1.984302 1.166073 1.1924995 6.149022
## Median   2.036889 1.166073 1.6280670 6.149022
## Mean     2.059131 1.166073 1.5810022 6.149022
## 3rd Qu.  2.133277 1.166073 1.8421305 6.149022
## Max.     2.160158 1.166073 3.2471165 6.149022
## 
## Log-likelihood GTWUGGR (Null Model): -192.1287 
## Deviance GTWUGGR (Null Model)      : 384.2574 
## 
## --- Step 4: Estimasi Parameter Model GTWUGGR ... !!!
## Estimasi Parameter Model GTWUGGR Lokasi ke:
## 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  
## 
## Geographically and Temporally Weighted Univariate Generalized Gamma Regression
## Created by: Hasbi Yasin
## ---
## Summary Parameter Model GTWUGGR:
##         Intercept PDRB.Perkapita   Kemiskinan  Rasio.Gender Akses.Sanitasi
## Min.    0.5996637   0.0006980649 -0.013565400 -2.358792e-05    0.000588930
## 1st Qu. 0.9486008   0.0049493734 -0.006134823  3.932657e-03    0.001695574
## Median  1.1665368   0.0061091529 -0.002815064  7.837805e-03    0.001870203
## Mean    1.1951640   0.0067309359 -0.003309795  7.157070e-03    0.002030523
## 3rd Qu. 1.3786739   0.0067230658 -0.001004831  9.945393e-03    0.002256576
## Max.    2.0673002   0.0172652435  0.004663315  1.856625e-02    0.004635481
##                 TPAK   Rasio.Guru  lambda       tau    delta
## Min.    -0.015210556 -0.006624177 0.14078  6.212064 6.149022
## 1st Qu. -0.002767736 -0.005358690 0.14078 11.007529 6.149022
## Median  -0.001754041 -0.004082753 0.14078 16.162416 6.149022
## Mean    -0.001266999 -0.003663167 0.14078 17.228918 6.149022
## 3rd Qu.  0.002185121 -0.002657707 0.14078 21.725200 6.149022
## Max.     0.010718284  0.003050819 0.14078 32.795570 6.149022
## ---
## Log-likelihood Model GTWUGGR    : -78.6335 
## Deviance Model GTWUGGR          : 157.267 
## Number of Effective Parameters  : 36.76675 
## 
## G2 UGGR    : 156.6412 on 6 degrees of freedom
## G2 GTWUGGR : 226.9904 on 36.76675 degrees of freedom      Sig.: 0 
## FStat     : 4.228658      Sig.: 0.00246874 
## Bandwidth Spasial : 0.2633616 0.2633616 0.2633616 0.2634546 0.3517587 
## Bandwidth Temporal: 4 
## RMSE      : 0.4819025 
## GCV       : 0.3721941 
## RSquared  : 0.8409276 
## Pseudo.RSq: 0.5907249 
## AIC       : 369.0337 
## 
## Required Time:  1.944311 mins
#Temporal 5
opt5.h = bw.gtwuggr(y,X,mydata.cord,t,hT=5, kernel.type = "gaussian")
## 
## Bandwidth optimum pada periode ke: 1 
## h.opt: 1.334043 Deviance score 77.93981 
## h.opt: 1.99604 Deviance score 79.46661 
## h.opt: 0.9249066 Deviance score 75.72708 
## h.opt: 0.6720463 Deviance score 73.25667 
## h.opt: 0.51577 Deviance score 71.14256 
## h.opt: 0.4191859 Deviance score 69.59311 
## h.opt: 0.3594937 Deviance score 68.70733 
## h.opt: 0.3226019 Deviance score 68.27831 
## h.opt: 0.2998015 Deviance score 68.06366 
## h.opt: 0.2857101 Deviance score 67.9478 
## h.opt: 0.2770011 Deviance score 67.88196 
## h.opt: 0.2716186 Deviance score 67.84338 
## h.opt: 0.2682921 Deviance score 67.82033 
## h.opt: 0.2662362 Deviance score 67.80639 
## h.opt: 0.2649656 Deviance score 67.79789 
## h.opt: 0.2641803 Deviance score 67.79268 
## h.opt: 0.2636949 Deviance score 67.78948 
## h.opt: 0.2633616 Deviance score 67.78728 
## h.opt: 0.2633616 Deviance score 67.78728 
## 
## Bandwidth optimum pada periode ke: 2 
## h.opt: 1.334043 Deviance score 77.56351 
## h.opt: 1.99604 Deviance score 79.42125 
## h.opt: 0.9249066 Deviance score 74.88906 
## h.opt: 0.6720463 Deviance score 71.9815 
## h.opt: 0.51577 Deviance score 69.49318 
## h.opt: 0.4191859 Deviance score 67.86939 
## h.opt: 0.3594937 Deviance score 66.91941 
## h.opt: 0.3226019 Deviance score 66.40631 
## h.opt: 0.2998015 Deviance score 66.13313 
## h.opt: 0.2857101 Deviance score 65.98034 
## h.opt: 0.2770011 Deviance score 65.89059 
## h.opt: 0.2716186 Deviance score 65.83641 
## h.opt: 0.2682921 Deviance score 65.80328 
## h.opt: 0.2662362 Deviance score 65.7829 
## h.opt: 0.2649656 Deviance score 65.77034 
## h.opt: 0.2641803 Deviance score 65.76259 
## h.opt: 0.2636949 Deviance score 65.7578 
## h.opt: 0.2633616 Deviance score 65.7545 
## h.opt: 0.2633616 Deviance score 65.7545 
## 
## Bandwidth optimum pada periode ke: 3 
## h.opt: 1.334043 Deviance score 72.69227 
## h.opt: 1.99604 Deviance score 75.21495 
## h.opt: 0.9249066 Deviance score 69.82127 
## h.opt: 0.6720463 Deviance score 67.32113 
## h.opt: 0.51577 Deviance score 64.92549 
## h.opt: 0.4191859 Deviance score 63.03339 
## h.opt: 0.3594937 Deviance score 62.02765 
## h.opt: 0.3226019 Deviance score 61.55658 
## h.opt: 0.2998015 Deviance score 61.3202 
## h.opt: 0.2857101 Deviance score 61.18908 
## h.opt: 0.2770011 Deviance score 61.11214 
## h.opt: 0.2716186 Deviance score 61.06588 
## h.opt: 0.2682921 Deviance score 61.03773 
## h.opt: 0.2662362 Deviance score 61.0205 
## h.opt: 0.2649656 Deviance score 61.00992 
## h.opt: 0.2641803 Deviance score 61.0034 
## h.opt: 0.2636949 Deviance score 60.99939 
## h.opt: 0.2633616 Deviance score 60.99663 
## h.opt: 0.2633616 Deviance score 60.99663 
## 
## Bandwidth optimum pada periode ke: 4 
## h.opt: 1.334043 Deviance score 97.02736 
## h.opt: 1.99604 Deviance score 98.82604 
## h.opt: 0.9249066 Deviance score 88.11094 
## h.opt: 0.6720463 Deviance score 70.45119 
## h.opt: 0.51577 Deviance score 66.13665 
## h.opt: 0.4601735 Deviance score 65.05027 
## h.opt: 0.3848254 Deviance score 64.10286 
## h.opt: 0.304336 Deviance score 61.22249 
## h.opt: 0.3350802 Deviance score 62.86232 
## h.opt: 0.2885125 Deviance score 60.24132 
## h.opt: 0.2787331 Deviance score 59.64686 
## h.opt: 0.2726891 Deviance score 59.29449 
## h.opt: 0.2689537 Deviance score 59.08425 
## h.opt: 0.2666451 Deviance score 58.95751 
## h.opt: 0.2652183 Deviance score 58.88045 
## h.opt: 0.2643365 Deviance score 58.83333 
## h.opt: 0.2637915 Deviance score 58.8044 
## h.opt: 0.2634546 Deviance score 58.7866 
## h.opt: 0.2634546 Deviance score 58.7866 
## 
## Bandwidth optimum pada periode ke: 5 
## h.opt: 1.334043 Deviance score 99.18755 
## h.opt: 1.99604 Deviance score 101.0736 
## h.opt: 0.9249066 Deviance score 97.36787 
## h.opt: 0.6720463 Deviance score 95.05511 
## h.opt: 0.51577 Deviance score 73.64319 
## h.opt: 0.4191859 Deviance score 64.30614 
## h.opt: 0.3594937 Deviance score 61.60667 
## h.opt: 0.3206582 Deviance score 63.00115 
## h.opt: 0.3618795 Deviance score 61.64671 
## h.opt: 0.3541215 Deviance score 61.55308 
## h.opt: 0.3413397 Deviance score 61.68178 
## h.opt: 0.3511248 Deviance score 61.54796 
## h.opt: 0.3517587 Deviance score 61.54744 
## h.opt: 0.352092 Deviance score 61.54752 
## h.opt: 0.3517587 Deviance score 61.54744 
## 
## Bandwidth Temporal       : 5 
## Bandwidth Spasial Optimum: 0.2633616 0.2633616 0.2633616 0.2634546 0.3517587 
## Objective                : 314.8725
hS5 = opt5.h$bandwidth
#run model GTWGGR
gtwuggr2.gauss5 = gtwuggr(y,X,coord = mydata.cord,t=t,hT=5,hS=hS5,
                         kernel.type ="gaussian")
## 
## -------------------------------------------------------------------
## Geographically and Temporally Weighted Generalized Gamma Regression Model
## -------------------------------------------------------------------
## printed at: 14 Apr 2026 20:43:52 
## created by: Hasbi Yasin
## 
## --- Step 1: Estimasi Parameter UGGD ... !!!
## 
## Parameter Model Univariate Generalized Gamma Distribution:
##        estimate
## lambda 1.166073
## tau    1.249126
## theta  1.527451
## delta  6.149022
## 
## Log-likelihood UGGD: -247.4655 
## Deviance UGGD      : 494.931 
## 
## --- Step 2: Estimasi Parameter Model UGGR ... !!!
##                     estimate
## Intercept       1.3756307370
## PDRB.Perkapita  0.0048494186
## Kemiskinan     -0.0056075305
## Rasio.Gender    0.0060933128
## Akses.Sanitasi  0.0016363970
## TPAK           -0.0009304218
## Rasio.Guru     -0.0045356843
## lambda          0.1407800239
## tau            11.0359896298
## delta           6.1490221227
## 
## Log-likelihood UGGR: -169.1449 
## Deviance UGGR      : 338.2898 
## 
## --- Step 3: Estimasi Parameter GTWUGGR (Null Model) ... !!!
## Estimasi Parameter GTWUGGR (Null Model) Lokasi ke:
## 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  
## 
## Summary Paramater GTWUGGR (Null Model):
##         Intercept   lambda       tau    delta
## Min.     1.963139 1.166073 0.7115594 6.149022
## 1st Qu.  1.982811 1.166073 1.1861858 6.149022
## Median   2.035490 1.166073 1.6209525 6.149022
## Mean     2.058019 1.166073 1.5736604 6.149022
## 3rd Qu.  2.132339 1.166073 1.8327040 6.149022
## Max.     2.159258 1.166073 3.2516065 6.149022
## 
## Log-likelihood GTWUGGR (Null Model): -191.7709 
## Deviance GTWUGGR (Null Model)      : 383.5418 
## 
## --- Step 4: Estimasi Parameter Model GTWUGGR ... !!!
## Estimasi Parameter Model GTWUGGR Lokasi ke:
## 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  
## 
## Geographically and Temporally Weighted Univariate Generalized Gamma Regression
## Created by: Hasbi Yasin
## ---
## Summary Parameter Model GTWUGGR:
##         Intercept PDRB.Perkapita   Kemiskinan Rasio.Gender Akses.Sanitasi
## Min.    0.5029868  -6.908913e-05 -0.011712189  0.000675964   0.0005863194
## 1st Qu. 0.8861612   4.670266e-03 -0.006961343  0.004479509   0.0016930291
## Median  1.0687053   6.080260e-03 -0.002951360  0.008512100   0.0018878326
## Mean    1.1782252   6.552341e-03 -0.003822121  0.007800931   0.0020045499
## 3rd Qu. 1.5253083   6.738223e-03 -0.001044660  0.010222164   0.0022446461
## Max.    2.0815204   2.313266e-02  0.005310139  0.017830923   0.0042472299
##                 TPAK   Rasio.Guru  lambda       tau    delta
## Min.    -0.014692400 -0.006998969 0.14078  7.946544 6.149022
## 1st Qu. -0.003522488 -0.005469695 0.14078 12.187520 6.149022
## Median  -0.002137346 -0.004205173 0.14078 15.872651 6.149022
## Mean    -0.001756940 -0.003662728 0.14078 16.965441 6.149022
## 3rd Qu.  0.002048964 -0.002430529 0.14078 20.447814 6.149022
## Max.     0.009585718  0.001595051 0.14078 30.588798 6.149022
## ---
## Log-likelihood Model GTWUGGR    : -80.43825 
## Deviance Model GTWUGGR          : 160.8765 
## Number of Effective Parameters  : 36.92687 
## 
## G2 UGGR    : 156.6412 on 6 degrees of freedom
## G2 GTWUGGR : 222.6653 on 36.92687 degrees of freedom      Sig.: 0 
## FStat     : 4.329571      Sig.: 0.002102557 
## Bandwidth Spasial : 0.2633616 0.2633616 0.2633616 0.2634546 0.3517587 
## Bandwidth Temporal: 5 
## RMSE      : 0.4928557 
## GCV       : 0.390209 
## RSquared  : 0.8336143 
## Pseudo.RSq: 0.5805503 
## AIC       : 372.8034 
## 
## Required Time:  1.283775 mins
sink()
file.show("Pencarian Bandwidth Optimum GTWGGR Data MYS.txt")

GTWGGR using Fixed spatial Bandwidth

source('Tipe 2 Optimasi bandwidth spasial GWUGGR.R')
#Full Data
mydata.cord = cbind(mydata$u,mydata$v)
t = mydata$t
opt2.h = bw.gwuggr(y,X,mydata.cord,kernel.type = "gaussian")
## h.opt: 0.9681442 Deviance score 454.8674 
## h.opt: 1.407402 Deviance score 481.1457 
## h.opt: 0.696668 Deviance score 430.4737 
## h.opt: 0.5288864 Deviance score 390.1109 
## h.opt: 0.4251917 Deviance score 359.9916 
## h.opt: 0.3611049 Deviance score 353.3162 
## h.opt: 0.3462438 Deviance score 371.5784 
## h.opt: 0.3900638 Deviance score 352.386 
## h.opt: 0.4034815 Deviance score 354.7891 
## h.opt: 0.3788066 Deviance score 351.2259 
## h.opt: 0.3776876 Deviance score 351.1766 
## h.opt: 0.3736288 Deviance score 351.1386 
## h.opt: 0.3688451 Deviance score 351.4575 
## h.opt: 0.3749589 Deviance score 351.1245 
## h.opt: 0.3752923 Deviance score 351.1253 
## h.opt: 0.3746256 Deviance score 351.1254 
## h.opt: 0.3749589 Deviance score 351.1245 
## 
## Bandwidth Optimum : 0.3749589 
## Objective         : 351.1245
hopt2 = opt2.h$bandwidth

#run model GTWUGGR
gtwuggr4.gauss1 = gtwuggr(y,X,coord = mydata.cord,t=t,hT=1,hS=rep(hopt2,5),
                          kernel.type ="gaussian")
## 
## -------------------------------------------------------------------
## Geographically and Temporally Weighted Generalized Gamma Regression Model
## -------------------------------------------------------------------
## printed at: 14 Apr 2026 20:45:19 
## created by: Hasbi Yasin
## 
## --- Step 1: Estimasi Parameter UGGD ... !!!
## 
## Parameter Model Univariate Generalized Gamma Distribution:
##        estimate
## lambda 1.166073
## tau    1.249126
## theta  1.527451
## delta  6.149022
## 
## Log-likelihood UGGD: -247.4655 
## Deviance UGGD      : 494.931 
## 
## --- Step 2: Estimasi Parameter Model UGGR ... !!!
##                     estimate
## Intercept       1.3756307370
## PDRB.Perkapita  0.0048494186
## Kemiskinan     -0.0056075305
## Rasio.Gender    0.0060933128
## Akses.Sanitasi  0.0016363970
## TPAK           -0.0009304218
## Rasio.Guru     -0.0045356843
## lambda          0.1407800239
## tau            11.0359896298
## delta           6.1490221227
## 
## Log-likelihood UGGR: -169.1449 
## Deviance UGGR      : 338.2898 
## 
## --- Step 3: Estimasi Parameter GTWUGGR (Null Model) ... !!!
## Estimasi Parameter GTWUGGR (Null Model) Lokasi ke:
## 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  
## 
## Summary Paramater GTWUGGR (Null Model):
##         Intercept   lambda       tau    delta
## Min.     1.976591 1.166073 0.8736218 6.149022
## 1st Qu.  2.017120 1.166073 1.3155892 6.149022
## Median   2.065279 1.166073 1.6529389 6.149022
## Mean     2.074509 1.166073 1.6047215 6.149022
## 3rd Qu.  2.137968 1.166073 1.8331683 6.149022
## Max.     2.161967 1.166073 2.7159150 6.149022
## 
## Log-likelihood GTWUGGR (Null Model): -209.7686 
## Deviance GTWUGGR (Null Model)      : 419.5372 
## 
## --- Step 4: Estimasi Parameter Model GTWUGGR ... !!!
## Estimasi Parameter Model GTWUGGR Lokasi ke:
## 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  Error in qr.solve(H[!fixed, !fixed, drop = FALSE], G0[!fixed], tol = slot(control,  : 
##   singular matrix 'a' in solve
## 31  32  33  34  35  
## 
## Geographically and Temporally Weighted Univariate Generalized Gamma Regression
## Created by: Hasbi Yasin
## ---
## Summary Parameter Model GTWUGGR:
##          Intercept PDRB.Perkapita    Kemiskinan  Rasio.Gender Akses.Sanitasi
## Min.    -0.3327499  -0.0001359246 -0.0126727596 -0.0158857444   3.777001e-05
## 1st Qu.  1.7948705   0.0037688056 -0.0076939019 -0.0046475374   1.422164e-03
## Median   2.1975828   0.0043772462 -0.0063887903 -0.0008798407   1.656253e-03
## Mean     2.0747200   0.0046664807 -0.0065335533 -0.0007015941   1.707178e-03
## 3rd Qu.  2.5928206   0.0049030101 -0.0052454592  0.0014895127   2.065308e-03
## Max.     3.8142411   0.0146472367  0.0007892463  0.0181337888   2.643020e-03
##                  TPAK    Rasio.Guru  lambda       tau    delta
## Min.    -0.0122572614 -0.0071134811 0.14078  7.432402 6.149022
## 1st Qu. -0.0036700983 -0.0050210160 0.14078 11.837643 6.149022
## Median  -0.0018311638 -0.0040095096 0.14078 17.141355 6.149022
## Mean    -0.0009432375 -0.0036293870 0.14078 17.813811 6.149022
## 3rd Qu.  0.0028822065 -0.0021472221 0.14078 24.446447 6.149022
## Max.     0.0077692808  0.0003997185 0.14078 30.824691 6.149022
## ---
## Log-likelihood Model GTWUGGR    : -110.058 
## Deviance Model GTWUGGR          : 220.1159 
## Number of Effective Parameters  : 24.44625 
## 
## G2 UGGR    : 156.6412 on 6 degrees of freedom
## G2 GTWUGGR : 199.4212 on 24.44625 degrees of freedom      Sig.: 0 
## FStat     : 3.200337      Sig.: 0.01843061 
## Bandwidth Spasial : 0.3749589 0.3749589 0.3749589 0.3749589 0.3749589 
## Bandwidth Temporal: 1 
## RMSE      : 0.5207069 
## GCV       : 0.3663361 
## RSquared  : 0.8142781 
## Pseudo.RSq: 0.4753363 
## AIC       : 419.5622 
## 
## Required Time:  2.109581 mins
gtwuggr4.gauss2 = gtwuggr(y,X,coord = mydata.cord,t=t,hT=2,hS=rep(hopt2,5),
                          kernel.type ="gaussian")
## 
## -------------------------------------------------------------------
## Geographically and Temporally Weighted Generalized Gamma Regression Model
## -------------------------------------------------------------------
## printed at: 14 Apr 2026 20:47:26 
## created by: Hasbi Yasin
## 
## --- Step 1: Estimasi Parameter UGGD ... !!!
## 
## Parameter Model Univariate Generalized Gamma Distribution:
##        estimate
## lambda 1.166073
## tau    1.249126
## theta  1.527451
## delta  6.149022
## 
## Log-likelihood UGGD: -247.4655 
## Deviance UGGD      : 494.931 
## 
## --- Step 2: Estimasi Parameter Model UGGR ... !!!
##                     estimate
## Intercept       1.3756307370
## PDRB.Perkapita  0.0048494186
## Kemiskinan     -0.0056075305
## Rasio.Gender    0.0060933128
## Akses.Sanitasi  0.0016363970
## TPAK           -0.0009304218
## Rasio.Guru     -0.0045356843
## lambda          0.1407800239
## tau            11.0359896298
## delta           6.1490221227
## 
## Log-likelihood UGGR: -169.1449 
## Deviance UGGR      : 338.2898 
## 
## --- Step 3: Estimasi Parameter GTWUGGR (Null Model) ... !!!
## Estimasi Parameter GTWUGGR (Null Model) Lokasi ke:
## 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  
## 
## Summary Paramater GTWUGGR (Null Model):
##         Intercept   lambda       tau    delta
## Min.     1.969565 1.166073 0.8463856 6.149022
## 1st Qu.  2.006773 1.166073 1.2397747 6.149022
## Median   2.055393 1.166073 1.5851063 6.149022
## Mean     2.064853 1.166073 1.5242299 6.149022
## 3rd Qu.  2.127984 1.166073 1.7173069 6.149022
## Max.     2.151919 1.166073 2.6188522 6.149022
## 
## Log-likelihood GTWUGGR (Null Model): -207.0638 
## Deviance GTWUGGR (Null Model)      : 414.1277 
## 
## --- Step 4: Estimasi Parameter Model GTWUGGR ... !!!
## Estimasi Parameter Model GTWUGGR Lokasi ke:
## 1  2  3  4  5  6  7  8  Error in qr.solve(H[!fixed, !fixed, drop = FALSE], G0[!fixed], tol = slot(control,  : 
##   singular matrix 'a' in solve
## 9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  
## 
## Geographically and Temporally Weighted Univariate Generalized Gamma Regression
## Created by: Hasbi Yasin
## ---
## Summary Parameter Model GTWUGGR:
##         Intercept PDRB.Perkapita   Kemiskinan Rasio.Gender Akses.Sanitasi
## Min.     0.576078   0.0008282716 -0.012361290 -0.003547497    0.001250098
## 1st Qu.  1.215738   0.0048062146 -0.006178682  0.001320265    0.001689375
## Median   1.290827   0.0055201025 -0.003990835  0.006795851    0.001755120
## Mean     1.332118   0.0055467877 -0.004836194  0.005364176    0.001795078
## 3rd Qu.  1.475698   0.0059744785 -0.002712595  0.007859261    0.001955040
## Max.     2.509941   0.0098021290 -0.001060661  0.014597459    0.002285027
##                  TPAK   Rasio.Guru  lambda       tau    delta
## Min.    -0.0086074514 -0.006114916 0.14078  6.751652 6.149022
## 1st Qu. -0.0029847532 -0.004953275 0.14078 10.829828 6.149022
## Median  -0.0011341613 -0.004179060 0.14078 15.015233 6.149022
## Mean     0.0001580949 -0.003502780 0.14078 15.392493 6.149022
## 3rd Qu.  0.0036160298 -0.002414925 0.14078 20.242350 6.149022
## Max.     0.0128481480  0.003022717 0.14078 27.144994 6.149022
## ---
## Log-likelihood Model GTWUGGR    : -93.12222 
## Deviance Model GTWUGGR          : 186.2444 
## Number of Effective Parameters  : 26.48231 
## 
## G2 UGGR    : 156.6412 on 6 degrees of freedom
## G2 GTWUGGR : 227.8832 on 26.48231 degrees of freedom      Sig.: 0 
## FStat     : 3.03388   Sig.: 0.02161067 
## Bandwidth Spasial : 0.3749589 0.3749589 0.3749589 0.3749589 0.3749589 
## Bandwidth Temporal: 2 
## RMSE      : 0.4574693 
## GCV       : 0.2905653 
## RSquared  : 0.8566491 
## Pseudo.RSq: 0.5502729 
## AIC       : 387.7267 
## 
## Required Time:  3.247168 mins
gtwuggr4.gauss3 = gtwuggr(y,X,coord = mydata.cord,t=t,hT=3,hS=rep(hopt2,5),
                          kernel.type ="gaussian")
## 
## -------------------------------------------------------------------
## Geographically and Temporally Weighted Generalized Gamma Regression Model
## -------------------------------------------------------------------
## printed at: 14 Apr 2026 20:50:40 
## created by: Hasbi Yasin
## 
## --- Step 1: Estimasi Parameter UGGD ... !!!
## 
## Parameter Model Univariate Generalized Gamma Distribution:
##        estimate
## lambda 1.166073
## tau    1.249126
## theta  1.527451
## delta  6.149022
## 
## Log-likelihood UGGD: -247.4655 
## Deviance UGGD      : 494.931 
## 
## --- Step 2: Estimasi Parameter Model UGGR ... !!!
##                     estimate
## Intercept       1.3756307370
## PDRB.Perkapita  0.0048494186
## Kemiskinan     -0.0056075305
## Rasio.Gender    0.0060933128
## Akses.Sanitasi  0.0016363970
## TPAK           -0.0009304218
## Rasio.Guru     -0.0045356843
## lambda          0.1407800239
## tau            11.0359896298
## delta           6.1490221227
## 
## Log-likelihood UGGR: -169.1449 
## Deviance UGGR      : 338.2898 
## 
## --- Step 3: Estimasi Parameter GTWUGGR (Null Model) ... !!!
## Estimasi Parameter GTWUGGR (Null Model) Lokasi ke:
## 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  
## 
## Summary Paramater GTWUGGR (Null Model):
##         Intercept   lambda       tau    delta
## Min.     1.966124 1.166073 0.8278824 6.149022
## 1st Qu.  2.001409 1.166073 1.1959645 6.149022
## Median   2.050375 1.166073 1.5401126 6.149022
## Mean     2.059890 1.166073 1.4793667 6.149022
## 3rd Qu.  2.122900 1.166073 1.6492223 6.149022
## Max.     2.146716 1.166073 2.5612990 6.149022
## 
## Log-likelihood GTWUGGR (Null Model): -206.4499 
## Deviance GTWUGGR (Null Model)      : 412.8998 
## 
## --- Step 4: Estimasi Parameter Model GTWUGGR ... !!!
## Estimasi Parameter Model GTWUGGR Lokasi ke:
## 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  Error in qr.solve(H[!fixed, !fixed, drop = FALSE], G0[!fixed], tol = slot(control,  : 
##   singular matrix 'a' in solve
## 17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  
## 
## Geographically and Temporally Weighted Univariate Generalized Gamma Regression
## Created by: Hasbi Yasin
## ---
## Summary Parameter Model GTWUGGR:
##         Intercept PDRB.Perkapita    Kemiskinan  Rasio.Gender Akses.Sanitasi
## Min.     1.028305   -0.001381882 -9.220262e-03 -0.0007334824    0.001093424
## 1st Qu.  1.120703    0.005288668 -4.853744e-03  0.0028229964    0.001592584
## Median   1.208147    0.005958863 -3.184670e-03  0.0077556372    0.001794122
## Mean     1.253783    0.005840526 -3.632501e-03  0.0065569624    0.001776480
## 3rd Qu.  1.358077    0.006328561 -2.063546e-03  0.0094582414    0.002025235
## Max.     1.757786    0.011175375  6.153274e-07  0.0127575060    0.002264516
##                 TPAK    Rasio.Guru  lambda       tau    delta
## Min.    -0.011197944 -0.0061434967 0.14078  6.393029 6.149022
## 1st Qu. -0.002850197 -0.0050513275 0.14078 10.678668 6.149022
## Median  -0.001795346 -0.0041991747 0.14078 16.232003 6.149022
## Mean    -0.000599596 -0.0039321050 0.14078 15.508166 6.149022
## 3rd Qu.  0.002102955 -0.0029611798 0.14078 20.003046 6.149022
## Max.     0.009134425  0.0008167071 0.14078 26.564564 6.149022
## ---
## Log-likelihood Model GTWUGGR    : -81.77142 
## Deviance Model GTWUGGR          : 163.5428 
## Number of Effective Parameters  : 27.1605 
## 
## G2 UGGR    : 156.6412 on 6 degrees of freedom
## G2 GTWUGGR : 249.357 on 27.1605 degrees of freedom    Sig.: 0 
## FStat     : 2.843617      Sig.: 0.02797416 
## Bandwidth Spasial : 0.3749589 0.3749589 0.3749589 0.3749589 0.3749589 
## Bandwidth Temporal: 3 
## RMSE      : 0.4262161 
## GCV       : 0.2545393 
## RSquared  : 0.8755668 
## Pseudo.RSq: 0.6039164 
## AIC       : 365.7033 
## 
## Required Time:  3.32642 mins
gtwuggr4.gauss4 = gtwuggr(y,X,coord = mydata.cord,t=t,hT=4,hS=rep(hopt2,5),
                          kernel.type ="gaussian")
## 
## -------------------------------------------------------------------
## Geographically and Temporally Weighted Generalized Gamma Regression Model
## -------------------------------------------------------------------
## printed at: 14 Apr 2026 20:54:00 
## created by: Hasbi Yasin
## 
## --- Step 1: Estimasi Parameter UGGD ... !!!
## 
## Parameter Model Univariate Generalized Gamma Distribution:
##        estimate
## lambda 1.166073
## tau    1.249126
## theta  1.527451
## delta  6.149022
## 
## Log-likelihood UGGD: -247.4655 
## Deviance UGGD      : 494.931 
## 
## --- Step 2: Estimasi Parameter Model UGGR ... !!!
##                     estimate
## Intercept       1.3756307370
## PDRB.Perkapita  0.0048494186
## Kemiskinan     -0.0056075305
## Rasio.Gender    0.0060933128
## Akses.Sanitasi  0.0016363970
## TPAK           -0.0009304218
## Rasio.Guru     -0.0045356843
## lambda          0.1407800239
## tau            11.0359896298
## delta           6.1490221227
## 
## Log-likelihood UGGR: -169.1449 
## Deviance UGGR      : 338.2898 
## 
## --- Step 3: Estimasi Parameter GTWUGGR (Null Model) ... !!!
## Estimasi Parameter GTWUGGR (Null Model) Lokasi ke:
## 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  
## 
## Summary Paramater GTWUGGR (Null Model):
##         Intercept   lambda       tau    delta
## Min.     1.964627 1.166073 0.8197121 6.149022
## 1st Qu.  1.999052 1.166073 1.1772235 6.149022
## Median   2.048117 1.166073 1.5200159 6.149022
## Mean     2.057712 1.166073 1.4602338 6.149022
## 3rd Qu.  2.120672 1.166073 1.6221840 6.149022
## Max.     2.144408 1.166073 2.5360989 6.149022
## 
## Log-likelihood GTWUGGR (Null Model): -206.3312 
## Deviance GTWUGGR (Null Model)      : 412.6624 
## 
## --- Step 4: Estimasi Parameter Model GTWUGGR ... !!!
## Estimasi Parameter Model GTWUGGR Lokasi ke:
## 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  
## 
## Geographically and Temporally Weighted Univariate Generalized Gamma Regression
## Created by: Hasbi Yasin
## ---
## Summary Parameter Model GTWUGGR:
##         Intercept PDRB.Perkapita   Kemiskinan Rasio.Gender Akses.Sanitasi
## Min.    0.6554803  -0.0001143117 -0.009826832 -0.007848865   0.0003325094
## 1st Qu. 1.0559640   0.0054496951 -0.004791862  0.003220378   0.0015737790
## Median  1.1766522   0.0060313795 -0.003140808  0.008506811   0.0018107898
## Mean    1.2105017   0.0059765892 -0.003451156  0.007057133   0.0017681817
## 3rd Qu. 1.2557217   0.0063905219 -0.002094393  0.010689475   0.0020439916
## Max.    2.6100432   0.0095330453  0.001371837  0.015129835   0.0024063052
##                  TPAK   Rasio.Guru  lambda       tau    delta
## Min.    -0.0127824268 -0.006765613 0.14078  6.221828 6.149022
## 1st Qu. -0.0031086344 -0.005283108 0.14078 10.296732 6.149022
## Median  -0.0018074750 -0.004338391 0.14078 16.051700 6.149022
## Mean    -0.0007445444 -0.003945502 0.14078 15.340476 6.149022
## 3rd Qu.  0.0017068357 -0.003014007 0.14078 20.006336 6.149022
## Max.     0.0113409951  0.001222692 0.14078 26.374063 6.149022
## ---
## Log-likelihood Model GTWUGGR    : -84.62734 
## Deviance Model GTWUGGR          : 169.2547 
## Number of Effective Parameters  : 27.21547 
## 
## G2 UGGR    : 156.6412 on 6 degrees of freedom
## G2 GTWUGGR : 243.4077 on 27.21547 degrees of freedom      Sig.: 0 
## FStat     : 2.919015      Sig.: 0.02497528 
## Bandwidth Spasial : 0.3749589 0.3749589 0.3749589 0.3749589 0.3749589 
## Bandwidth Temporal: 4 
## RMSE      : 0.4927563 
## GCV       : 0.3404729 
## RSquared  : 0.8336814 
## Pseudo.RSq: 0.5898471 
## AIC       : 371.4701 
## 
## Required Time:  2.609375 mins
gtwuggr4.gauss5 = gtwuggr(y,X,coord = mydata.cord,t=t,hT=5,hS=rep(hopt2,5),
                          kernel.type ="gaussian")
## 
## -------------------------------------------------------------------
## Geographically and Temporally Weighted Generalized Gamma Regression Model
## -------------------------------------------------------------------
## printed at: 14 Apr 2026 20:56:37 
## created by: Hasbi Yasin
## 
## --- Step 1: Estimasi Parameter UGGD ... !!!
## 
## Parameter Model Univariate Generalized Gamma Distribution:
##        estimate
## lambda 1.166073
## tau    1.249126
## theta  1.527451
## delta  6.149022
## 
## Log-likelihood UGGD: -247.4655 
## Deviance UGGD      : 494.931 
## 
## --- Step 2: Estimasi Parameter Model UGGR ... !!!
##                     estimate
## Intercept       1.3756307370
## PDRB.Perkapita  0.0048494186
## Kemiskinan     -0.0056075305
## Rasio.Gender    0.0060933128
## Akses.Sanitasi  0.0016363970
## TPAK           -0.0009304218
## Rasio.Guru     -0.0045356843
## lambda          0.1407800239
## tau            11.0359896298
## delta           6.1490221227
## 
## Log-likelihood UGGR: -169.1449 
## Deviance UGGR      : 338.2898 
## 
## --- Step 3: Estimasi Parameter GTWUGGR (Null Model) ... !!!
## Estimasi Parameter GTWUGGR (Null Model) Lokasi ke:
## 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  
## 
## Summary Paramater GTWUGGR (Null Model):
##         Intercept   lambda       tau    delta
## Min.     1.963887 1.166073 0.8156329 6.149022
## 1st Qu.  1.997906 1.166073 1.1674950 6.149022
## Median   2.046989 1.166073 1.5101170 6.149022
## Mean     2.056632 1.166073 1.4508965 6.149022
## 3rd Qu.  2.119560 1.166073 1.6124201 6.149022
## Max.     2.143270 1.166073 2.5237458 6.149022
## 
## Log-likelihood GTWUGGR (Null Model): -206.3164 
## Deviance GTWUGGR (Null Model)      : 412.6327 
## 
## --- Step 4: Estimasi Parameter Model GTWUGGR ... !!!
## Estimasi Parameter Model GTWUGGR Lokasi ke:
## 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  
## 
## Geographically and Temporally Weighted Univariate Generalized Gamma Regression
## Created by: Hasbi Yasin
## ---
## Summary Parameter Model GTWUGGR:
##         Intercept PDRB.Perkapita   Kemiskinan Rasio.Gender Akses.Sanitasi
## Min.    0.9225402   0.0008649153 -0.010365401 -0.011879020   0.0005061551
## 1st Qu. 1.0589691   0.0057217568 -0.004494244  0.003665191   0.0014959896
## Median  1.1590341   0.0061047689 -0.002752834  0.008520347   0.0018491247
## Mean    1.2181829   0.0060623106 -0.003350747  0.006959888   0.0017220294
## 3rd Qu. 1.2321241   0.0065386802 -0.001941645  0.010670545   0.0020128972
## Max.    2.8498847   0.0096193447  0.003569320  0.016302580   0.0022609045
##                  TPAK   Rasio.Guru  lambda       tau    delta
## Min.    -0.0137487083 -0.006151577 0.14078  6.472252 6.149022
## 1st Qu. -0.0030400772 -0.005273479 0.14078  9.988527 6.149022
## Median  -0.0020087650 -0.004246458 0.14078 16.147974 6.149022
## Mean    -0.0006884244 -0.004081275 0.14078 15.338264 6.149022
## 3rd Qu.  0.0020513739 -0.003154918 0.14078 20.699641 6.149022
## Max.     0.0092714109  0.001597105 0.14078 26.293399 6.149022
## ---
## Log-likelihood Model GTWUGGR    : -84.5283 
## Deviance Model GTWUGGR          : 169.0566 
## Number of Effective Parameters  : 27.236 
## 
## G2 UGGR    : 156.6412 on 6 degrees of freedom
## G2 GTWUGGR : 243.5761 on 27.236 degrees of freedom    Sig.: 0 
## FStat     : 2.919198      Sig.: 0.02495286 
## Bandwidth Spasial : 0.3749589 0.3749589 0.3749589 0.3749589 0.3749589 
## Bandwidth Temporal: 5 
## RMSE      : 0.4983909 
## GCV       : 0.3484007 
## RSquared  : 0.829856 
## Pseudo.RSq: 0.5902976 
## AIC       : 371.2926 
## 
## Required Time:  2.898675 mins

Save Output of the best GTWGGR Model

# Save Output of GTWGGR Model 
write.csv(gtwuggr2.gauss3$Parameter.GTWUGGR,"GTWGGR Parameters.csv",
          row.names = FALSE)
write.csv(gtwuggr2.gauss3$Beta,"Coefficients of GTWGGR Model.csv",
          row.names = FALSE)
write.csv(gtwuggr2.gauss3$SE.beta,"Standard Error of GTWGGR Coefficients.csv",
          row.names = FALSE)
write.csv(gtwuggr2.gauss3$Zhit,"Z-Stats of GTWGGR Model.csv",
          row.names = FALSE)
write.csv(gtwuggr2.gauss3$Sig.beta,"p-value of of GTWGGR Coefficients.csv",
          row.names = FALSE)

Surface Map

Based on the partial test results of the GTWGGR model at each location, it is possible to group districts/cities that have similarities based on coefficients of predictor variables for each responses. The clustering process is based on the coefficient value of each predictor on each response variable.

library(tidyverse) 
library(tmaptools) 
library(ggplot2) 
library(cartogram) 
library(geogrid) 
library(geosphere) 
library(broom)
library(sf)
library(RColorBrewer)
library(sp)

options(warn = -1)
#Read polygon data####
jateng.shp <- st_read("central_java.shp")
## Reading layer `central_java' from data source 
##   `C:\HASBI\Penelitian 2025\ISNPINSA 2025\GTWGGR_App\central_java.shp' 
##   using driver `ESRI Shapefile'
## Simple feature collection with 35 features and 5 fields
## Geometry type: MULTIPOLYGON
## Dimension:     XY
## Bounding box:  xmin: 108.5554 ymin: -8.212804 xmax: 111.6933 ymax: -5.727798
## CRS:           NA
names(jateng.shp)
## [1] "KODE_KAB"  "NAMA_KAB"  "KODE_PROP" "NAMA_PROP" "JKB"       "geometry"
jateng.shp$X1 = gtwuggr2.gauss3$Parameter.GTWUGGR[,2]
jateng.shp$X2 = gtwuggr2.gauss3$Parameter.GTWUGGR[,3]
jateng.shp$X3 = gtwuggr2.gauss3$Parameter.GTWUGGR[,4]
jateng.shp$X4 = gtwuggr2.gauss3$Parameter.GTWUGGR[,5]
jateng.shp$X5 = gtwuggr2.gauss3$Parameter.GTWUGGR[,6]
jateng.shp$X6 = gtwuggr2.gauss3$Parameter.GTWUGGR[,7]

jateng.shp2 = as(jateng.shp,"Spatial")

Mapping surface of X1 Coefficients

min_val <- min(jateng.shp2$X1, na.rm = TRUE)
max_val <- max(jateng.shp2$X1, na.rm = TRUE)
at_breaks <- seq(min_val, max_val, length = 6)  # misalnya 5 kelas
spplot(jateng.shp2, zcol="X1", main = "Coeff1",
       col.regions = brewer.pal(5, "Blues"),
       at = at_breaks,
       colorkey = list(
         space = "top",           # posisi legend
         labels = list(cex = 0.8)  # ukuran teks legend
       ))

Mapping surface of X2 Coefficients

min_val <- min(jateng.shp2$X2, na.rm = TRUE)
max_val <- max(jateng.shp2$X2, na.rm = TRUE)
at_breaks <- seq(min_val, max_val, length = 6)  # misalnya 5 kelas
spplot(jateng.shp2, zcol="X2", main = "Coeff2",
       col.regions = brewer.pal(5, "Blues"),
       at = at_breaks,
       colorkey = list(
         space = "top",           # posisi legend
         labels = list(cex = 0.8)  # ukuran teks legend
       ))

Mapping surface of X3 Coefficients

tmin_val <- min(jateng.shp2$X3, na.rm = TRUE)
max_val <- max(jateng.shp2$X3, na.rm = TRUE)
at_breaks <- seq(min_val, max_val, length = 6)  # misalnya 5 kelas
spplot(jateng.shp2, zcol="X3", main = "Coeff3",
       col.regions = brewer.pal(5, "Blues"),
       at = at_breaks,
       colorkey = list(
         space = "top",           # posisi legend
         labels = list(cex = 0.8)  # ukuran teks legend
       ))

Mapping surface of X4 Coefficients

min_val <- min(jateng.shp2$X4, na.rm = TRUE)
max_val <- max(jateng.shp2$X4, na.rm = TRUE)
at_breaks <- seq(min_val, max_val, length = 6)  # misalnya 5 kelas
spplot(jateng.shp2, zcol="X4", main = "Coeff4",
       col.regions = brewer.pal(5, "Blues"),
       at = at_breaks,
       colorkey = list(
         space = "top",           # posisi legend
         labels = list(cex = 0.8)  # ukuran teks legend
       ))

Mapping surface of X5 Coefficients

min_val <- min(jateng.shp2$X5, na.rm = TRUE)
max_val <- max(jateng.shp2$X5, na.rm = TRUE)
at_breaks <- seq(min_val, max_val, length = 6)  # misalnya 5 kelas
spplot(jateng.shp2, zcol="X5", main = "Coeff5",
       col.regions = brewer.pal(5, "Blues"),
       at = at_breaks,
       colorkey = list(
         space = "top",           # posisi legend
         labels = list(cex = 0.8)  # ukuran teks legend
       ))

## Mapping surface of X6 Coefficients

min_val <- min(jateng.shp2$X6, na.rm = TRUE)
max_val <- max(jateng.shp2$X6, na.rm = TRUE)
at_breaks <- seq(min_val, max_val, length = 6)  # misalnya 5 kelas
spplot(jateng.shp2, zcol="X6", main = "Coeff6",
       col.regions = brewer.pal(5, "Blues"),
       at = at_breaks,
       colorkey = list(
         space = "top",           # posisi legend
         labels = list(cex = 0.8)  # ukuran teks legend
       ))