1. Install Packages

Before running the MCPGIGR analysis, several R packages must be installed and loaded to ensure that all functions required for optimisation, distribution evaluation, and data handling are available.
The code below shows the core packages used in this implementation.


# Core packages required for the MCPGIGR implementation
library("gmp")
library("Rmpfr")
library("MASS")
library("MixedPoisson")
library("gamlss")
library("Bessel")
library("maxLik")
library("COUNT")
library("readxl")

To keep the main scripts clean, the actual installation and loading of these packages are handled in a separate script:

2. Input Data and Descriptive Statistics

The empirical data are available at:
https://dinkes.jatimprov.go.id/index.php?r=site/file_list&id_file=10&id_berita=8

Below is the summary of the outcome variables \(Y_1\) and \(Y_2\), as well as the predictor variables \(X_1\)\(X_6\).


source("Input Data.R")
source("Descriptive Data.R")

2.1 Outcome variables (Y1, Y2)

summary_y %>%
  round(3) %>%
  kable(caption = "Summary of outcome variables (Y1 and Y2).") %>%
  kable_styling(full_width = FALSE,
                bootstrap_options = c("striped", "hover", "condensed"))
Summary of outcome variables (Y1 and Y2).
Mean SD Variance CV_percent Min Max
Y1 12.97 10.23 104.67 78.86 0 50
Y2 89.53 66.02 4358.63 73.74 5 287

2.2 Predictor variables (X1–X6)

summary_x %>%
  round(3) %>%
  kable(caption = "Summary of predictor variables (X1–X6).") %>%
  kable_styling(full_width = FALSE,
                bootstrap_options = c("striped", "hover", "condensed"))
Summary of predictor variables (X1–X6).
Mean Standard_Deviation
X1 81.65 14.76
X2 20.59 4.40
X3 59.88 16.59
X4 78.04 11.10
X5 20.44 15.10
X6 92.35 7.99

3. Initial Values

The initial values are obtained from Poisson regression and then used as starting values for the MCPGIGR estimation.

# Script for generating initial parameter values
source("Initial Value.R")

3.1 Initial regression coefficients

beta_table %>%
  round(6) %>%
  kable(caption = "Initial Poisson-based regression coefficients (beta_0–beta_6) for Y1 and Y2.") %>%
  kable_styling(full_width = FALSE,
                bootstrap_options = c("striped", "hover", "condensed"))
Initial Poisson-based regression coefficients (beta_0–beta_6) for Y1 and Y2.
beta_0 beta_1 beta_2 beta_3 beta_4 beta_5 beta_6
Y1 -7.290600 -0.003549 0.026758 0.003653 -0.010326 -0.028836 0.010342
Y2 -4.051717 0.002684 -0.014971 0.002583 -0.028747 0.007146 0.009814

3.2 Initial dispersion / mixing parameters

disp_table$Initial <- round(disp_table$Initial, 6)
disp_table %>%
  kable(caption = "Initial values for dispersion / mixing parameters (tau and psi).") %>%
  kable_styling(full_width = FALSE,
                bootstrap_options = c("striped", "hover", "condensed"))
Initial values for dispersion / mixing parameters (tau and psi).
Parameter Initial
tau 0.544815
psi 1.000000

4. Parameter Estimates (MCPGIGR)

Parameter estimation is carried out using maximum likelihood with the BHHH algorithm.


# Scripts for MCPGIGR parameter estimation using MLE + BHHH
source("LnLikelihood.R")
source("Gradient.R")
source("Model Estimate.R")
source("Parameter Result.R")

4.1 Regression coefficients

param_table %>%
  round(6) %>%
  kable(caption = "MCPGIGR regression coefficient estimates for Y1 and Y2 (beta_0–beta_6).") %>%
  kable_styling(full_width = FALSE,
                bootstrap_options = c("striped", "hover", "condensed"))
MCPGIGR regression coefficient estimates for Y1 and Y2 (beta_0–beta_6).
beta_0 beta_1 beta_2 beta_3 beta_4 beta_5 beta_6
Y1 -4.921283 -0.003412 0.006403 0.000376 -0.016859 -0.012137 0.001298
Y2 -4.274388 0.004497 -0.016628 0.003926 -0.031171 0.010852 0.015793

4.2 Dispersion / mixing parameters

disp_table_hat$Estimate <- round(disp_table_hat$Estimate, 6)
disp_table_hat %>%
  kable(caption = "Estimated dispersion / mixing parameters (psi and tau).") %>%
  kable_styling(full_width = FALSE,
                bootstrap_options = c("striped", "hover", "condensed"))
Estimated dispersion / mixing parameters (psi and tau).
Parameter Estimate
psi 1.297504
tau 0.484547

5. Hypothesis Testing (Z-tests and Likelihood Ratio Test)

Hypothesis testing is based on the likelihood ratio test for the global model comparison and Z-tests for individual parameters.


# Script for Z-tests and Likelihood Ratio Tests
source("Hypothesis Testing Result.R")

5.1 Simultaneous Test

Simultaneous.Test %>%
  round(6) %>%
  kable(caption = "Simultaneous test for MCPGIGR parameters.") %>%
  kable_styling(full_width = FALSE,
                bootstrap_options = c("striped", "hover", "condensed"))
Simultaneous test for MCPGIGR parameters.
Simultaneous.Test Pr(>&#124;Z&#124;)
336.7596 0

5.1 Partial Test

Partial.test %>%
  round(6) %>%
  kable(caption = "Z-tests for individual MCPGIGR parameters (b01–b61, b02–b62, psi, tau).") %>%
  kable_styling(full_width = FALSE,
                bootstrap_options = c("striped", "hover", "condensed"))
Z-tests for individual MCPGIGR parameters (b01–b61, b02–b62, psi, tau).
Estimate Std.Error Z.Value Pr(>&#124;Z&#124;)
b01 -4.921283 0.016518 -297.941987 0.000000
b11 -0.003412 0.002037 -1.675191 0.093897
b21 0.006404 0.003267 1.960184 0.049974
b31 0.000376 0.000938 0.401499 0.688052
b41 -0.016859 0.002558 -6.591714 0.000000
b51 -0.012137 0.003193 -3.800975 0.000144
b61 0.001298 0.002869 0.452431 0.650959
b02 -4.274388 0.033551 -127.398252 0.000000
b12 0.004497 0.001095 4.106302 0.000040
b22 -0.016628 0.002215 -7.505981 0.000000
b32 0.003927 0.000416 9.442844 0.000000
b42 -0.031171 0.001041 -29.943672 0.000000
b52 0.010852 0.000970 11.192611 0.000000
b62 0.015793 0.001458 10.828882 0.000000
psi 1.297504 0.008319 155.967692 0.000000
tau 0.484547 0.015378 31.508816 0.000000

6. Reproducibility Notes

## - All results above are generated using R version 4.3.3.
## - The full MCPGIGR pipeline is implemented through modular scripts (e.g., ` Install Packages.R`, `Input Data.R`, `Initial Value.R`, and the likelihood/gradient/estimation scripts) in the project root and `R/` folder.
## - To reproduce this report:
##   1. Clone the GitHub repository.
##   2. Open `MCPGIGR_Method.Rproj` in RStudio.
##   3. Run the modular scripts (or this R Markdown file) in the same working directory.
##   4. Knit this file to HTML.