Title: | Displays GWR (Geographically Weighted Regression) and Mixed GWR Output and Map |
---|---|
Description: | Display processing results using the GWR (Geographically Weighted Regression) method, display maps, and show the results of the Mixed GWR (Mixed Geographically Weighted Regression) model which automatically selects global variables based on variability between regions. This function refers to Yasin, & Purhadi. (2012). "Mixed Geographically Weighted Regression Model (Case Study the Percentage of Poor Households in Mojokerto 2008)". European Journal of Scientific Research, 188-196. <https://www.researchgate.net/profile/Hasbi-Yasin-2/publication/289689583_Mixed_geographically_weighted_regression_model_case_study_The_percentage_of_poor_households_in_Mojokerto_2008/links/58e46aa40f7e9bbe9c94d641/Mixed-geographically-weighted-regression-model-case-study-The-percentage-of-poor-households-in-Mojokerto-2008.pdf>. |
Authors: | Asy-Syaja'ul Haqqul Amin [cre, aut], Waris Marsisno [aut] |
Maintainer: | Asy-Syaja'ul Haqqul Amin <[email protected]> |
License: | GPL-3 |
Version: | 1.1.1.5 |
Built: | 2025-02-16 05:17:21 UTC |
Source: | https://github.com/cran/mgwrhw |
displays the GWR and mixed GWR models automatically along with the tests and significance maps that are formed.
mgwrhw(dpk, pers.reg, coor_lat, coor_long, vardep, GWRonly, kp, alp)
mgwrhw(dpk, pers.reg, coor_lat, coor_long, vardep, GWRonly, kp, alp)
dpk |
dataframe all variables that come from the shp data format and have geometric attributes that are usually imported with the st_read function from library(sf) |
pers.reg |
The form of the regression equation that will be used as a GWR model is in the general form y~x1+x2+x3 |
coor_lat |
the name of the variable that is in the dpk dataframe that contains latitude coordinates and is written with quotation marks such as "Latitude" which indicates a column named Latitude |
coor_long |
the name of the variable that is in the dpk dataframe that contains latitude coordinates and is written with quotation marks such as "Longitude" which indicates a column named Longitude |
vardep |
the name of a variable that is in a dpk dataframe that contains one dependent variable and is written with quotation marks such as "y" which indicates a column named y |
GWRonly |
user option to choose to display GWR results only or to form an MGWR model. Option 1 displays GWR output only while option 0 displays GWR and MGWR output. |
kp |
user option to select kernel functions. Option 1 for Fixed Bisquare, option 2 for Fixed Gaussian, option 3 for Adaptive Bisquare, and option 4 for Adaptive Bisquare |
alp |
alpha value (type 1 error) used in spatial regression model |
no return value, called for side effects
This function returns a list with the following objects:
the general equation form of the Mixed GWR model is
=
(
,
) +
(
,
)
+
+
A character vector containing the captured output of GWR model and Mixed GWR model.
The result of the GWR model include CV, bandwith, Quasi R square, etc.
Results of the variability test for global and local variables.
:
(
,
) =
(
,
) = ... =
(
,
)
: not all
(
,
) (
= 1, 2, ..., n) are equal
Conclusion : Reject if
(
) or p-value <
.
If is rejected, it means that the k-th variable has a local influence, while if
fails to be rejected, it means that the k-th variable has a global influence.
Reference : Leung, Y., Mei, C.L., & Zhang, W.X., (2000). "Statistic Tests for Spatial Non-Stationarity Based on the Geographically Weighted Regression Model", Environment and Planning A, 32 pp. 9-32. doi:10.1068/a3162.
Results of the F1(GoF Mixed GWR), F2(Global Simultaneous), F3(Local Simultaneous) tests.
F1(GoF Mixed GWR) :
:
(
,
) =
: at least there is one
(
,
)
if is rejected, it shows that the Mixed GWR model is different from the OLS model]
F2(Global Simultaneous) :
:
=
= ... =
= 0
: at least one of
0
If is rejected, it indicates that there is at least one global variable that has a significant effect in the model
F3(Local Simultaneous)
:
(
,
) =
(
,
) = ... =
(
,
) = 0
: at least one of
(
,
)
0
If is rejected, it indicates that there is at least one local variable that has a significant effect in the model
Reference : Yasin, & Purhadi. (2012). "Mixed Geographically Weighted Regression Model (Case Study the Percentage of Poor Households in Mojokerto 2008)". European Journal of Scientific Research, 188-196. https://www.researchgate.net/profile/Hasbi-Yasin-2/publication/289689583_Mixed_geographically_weighted_regression_model_case_study_The_percentage_of_poor_households_in_Mojokerto_2008/links/58e46aa40f7e9bbe9c94d641/Mixed-geographically-weighted-regression-model-case-study-The-percentage-of-poor-households-in-Mojokerto-2008.pdf.
Results of the global partial test.
:
= 0 (k-th global variables are not significant)
:
0 (k-th global variables are significant)
If is rejected, it indicates that the k-th global variable has a significant effect
Reference : Yasin, & Purhadi. (2012). "Mixed Geographically Weighted Regression Model (Case Study the Percentage of Poor Households in Mojokerto 2008)". European Journal of Scientific Research, 188-196. https://www.researchgate.net/profile/Hasbi-Yasin-2/publication/289689583_Mixed_geographically_weighted_regression_model_case_study_The_percentage_of_poor_households_in_Mojokerto_2008/links/58e46aa40f7e9bbe9c94d641/Mixed-geographically-weighted-regression-model-case-study-The-percentage-of-poor-households-in-Mojokerto-2008.pdf.
Visualization of Mixed GWR results in the form of a regional map with variables that are significant globally and locally.
A list of global variables used in the analysis.
A list of local variables used in the analysis.
The corrected Akaike Information Criterion.
The Akaike Information Criterion.
The coefficient of determination.
The adjusted coefficient of determination.
A data frame about output table of MGWR model (include estimator, standar error, t-statistics, p-value).
the general equation form of the GWR model is
=
(
,
) +
(
,
)
+
A character vector containing the captured output of GWR model.
A character vector containing the result of the GWR model include CV, bandwith, Quasi R square, etc.
A character vector containing the results of the Godness of Fit Test.
Results of the anova table.
Visualization of the GWR results.
A data frame about output table of GWR model (include estimator, standar error, t-statistics, p-value).
mod1 = mgwrhw(dpk=redsb, pers.reg = Y ~ X2 + X4 + X5 + X6, coor_lat = "Latitude", coor_long = "Longitude", vardep = "Y", GWRonly = 0, kp = 3, alp = 0.05) mod1$gwr mod1$Variability.Test mod1$Global_variable mod1$Local_variable mod1$F1.F2.F3.mgwr.Test mod1$Global.Partial.Test mod1$map.mgwr
mod1 = mgwrhw(dpk=redsb, pers.reg = Y ~ X2 + X4 + X5 + X6, coor_lat = "Latitude", coor_long = "Longitude", vardep = "Y", GWRonly = 0, kp = 3, alp = 0.05) mod1$gwr mod1$Variability.Test mod1$Global_variable mod1$Local_variable mod1$F1.F2.F3.mgwr.Test mod1$Global.Partial.Test mod1$map.mgwr
Data to show stunting prevalence in every district from an island
redsb
redsb
An object of class sf
(inherits from data.frame
) with 33 rows and 15 columns.