mgwrhw {mgwrhw} | R Documentation |
mgwrhw
Description
displays the GWR and mixed GWR models automatically along with the tests and significance maps that are formed.
Usage
mgwrhw(dpk, pers.reg, coor_lat, coor_long, vardep, GWRonly, kp, alp)
Arguments
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 |
Value
no return value, called for side effects
This function returns a list with the following objects:
for Mixed GWR model (GWRonly = 0)
the general equation form of the Mixed GWR model is
=
(
,
) +
(
,
)
+
+
- output
A character vector containing the captured output of GWR model and Mixed GWR model.
- gwr
The result of the GWR model include CV, bandwith, Quasi R square, etc.
- Variability.Test
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.
- F1.F2.F3.mgwr.Test
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.
- Global.Partial.Test
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.
- map.mgwr
Visualization of Mixed GWR results in the form of a regional map with variables that are significant globally and locally.
- Global_variable
A list of global variables used in the analysis.
- Local_variable
A list of local variables used in the analysis.
- AICc
The corrected Akaike Information Criterion.
- AIC
The Akaike Information Criterion.
- R_square
The coefficient of determination.
- adj_R_square
The adjusted coefficient of determination.
- table.mgwr
A data frame about output table of MGWR model (include estimator, standar error, t-statistics, p-value).
for GWR model (GWRonly = 1)
the general equation form of the GWR model is
=
(
,
) +
(
,
)
+
- output
A character vector containing the captured output of GWR model.
- gwr
A character vector containing the result of the GWR model include CV, bandwith, Quasi R square, etc.
- GoF.test
A character vector containing the results of the Godness of Fit Test.
- anova_gwr
Results of the anova table.
- map.gwr
Visualization of the GWR results.
- table.gwr
A data frame about output table of GWR model (include estimator, standar error, t-statistics, p-value).
Examples
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