Title: | Geographically Weighted Logistic Elastic Net Regression |
---|---|
Description: | Fit a geographically weighted logistic elastic net regression. Detailed explanations can be found in Yoneoka et al. (2016): New algorithm for constructing area-based index with geographical heterogeneities and variable selection: An application to gastric cancer screening <doi:10.1038/srep26582>. |
Authors: | Daisuke Yoneoka, Eiko Saito |
Maintainer: | Daisuke Yoneoka <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.2.2 |
Built: | 2024-11-19 05:25:45 UTC |
Source: | https://github.com/cran/GWLelast |
This pacakge fits the geographically weighted logistic elastic net regression model for a valible seelction and for the mitigatin of the multicolinearity between coefficients due to geographical correlation. Detailed explanations can be found in Yoneoka et al. (2016): New algorithm for constructing area-based index with geographical heterogeneities and variable selection: An application to gastric cancer screening.
Cross validation for geographically weighted logistic elastic net regression
GWLelast.cv.bw(x = x, y = y, D = D, coords = coords, alpha = 1, lambda = lambda, nlambda = nlambda, gweight = gweight, longlat = longlat, bw = bw)
GWLelast.cv.bw(x = x, y = y, D = D, coords = coords, alpha = 1, lambda = lambda, nlambda = nlambda, gweight = gweight, longlat = longlat, bw = bw)
x |
Covariates. |
y |
Outcome binary variable. |
D |
Distance matrix. |
coords |
2 columns matrix including "longitude" and "latitude". |
alpha |
The elasticnet mixing parameter [0,1] in glmnet package. |
lambda |
Optional user-supplied lambda sequence in glmnet package. |
nlambda |
The number of lambda values in glmnet package. |
gweight |
geographical kernel function in spgwr package. |
longlat |
Indicate if the coords parameter are sperically calculated. |
bw |
bandwidth of geographical kernel function. |
error Cross validation error.
Fitting geographically weighted logistic elastic net regression
GWLelast.est(x, y, coords, D = NULL, alpha = 1, lambda = NULL, nlambda = NULL, gweight = c("gwr.Gauss", "gwr.bisquare"), longlat = TRUE, bw = bw)
GWLelast.est(x, y, coords, D = NULL, alpha = 1, lambda = NULL, nlambda = NULL, gweight = c("gwr.Gauss", "gwr.bisquare"), longlat = TRUE, bw = bw)
x |
Covariates. |
y |
Outcome binary variable. |
coords |
2 columns matrix including "longitude" and "latitude". |
D |
Distance matrix. |
alpha |
The elasticnet mixing parameter [0,1] in glmnet package. |
lambda |
Optional user-supplied lambda sequence in glmnet package. |
nlambda |
The number of lambda values in glmnet package. |
gweight |
geographical kernel function in spgwr package. |
longlat |
Indicate if the coords parameter are sperically calculated. |
bw |
bandwidth of geographical kernel function. |
model: Fitted model at location i.
error: Cross validation error.
Inner part of fitting GWLelast without parallel cores
GWLelast.inner(x = x, y = y, coords = coords, W = W, lambda = lambda, alpha = 1, nlambda = nlambda)
GWLelast.inner(x = x, y = y, coords = coords, W = W, lambda = lambda, alpha = 1, nlambda = nlambda)
x |
Covariates. |
y |
Outcome binary variable. |
coords |
2 columns matrix including "longitude" and "latitude". |
W |
Weight matrix. |
lambda |
Optional user-supplied lambda sequence in glmnet package. |
alpha |
The elasticnet mixing parameter [0,1] in glmnet package. |
nlambda |
The number of lambda values in glmnet package. |
model Fitted model at location i.
error Cross validation error.
Bandwidth selection forgeographically weighted logistic elastic net regression
GWLelast.sel.bw(x, y, coords, D = NULL, alpha = 1, lambda = NULL, nlambda = NULL, gweight = gweight, longlat = TRUE, lower.bw = NULL, upper.bw = NULL)
GWLelast.sel.bw(x, y, coords, D = NULL, alpha = 1, lambda = NULL, nlambda = NULL, gweight = gweight, longlat = TRUE, lower.bw = NULL, upper.bw = NULL)
x |
Covariates. |
y |
Outcome binary variable. |
coords |
2 columns matrix including "longitude" and "latitude". |
D |
Distance matrix. |
alpha |
The elasticnet mixing parameter [0,1] in glmnet package. |
lambda |
Optional user-supplied lambda sequence in glmnet package. |
nlambda |
The number of lambda values in glmnet package. |
gweight |
geographical kernel function in spgwr package. |
longlat |
Indicate if the coords parameter are sperically calculated. |
lower.bw |
Lower limit of bandwidth in geographical kernel. |
upper.bw |
Upper limit of bandwidth in geographical kernel. |
optimal.bw Optimal bandwidth.
###################### # Need to add
###################### # Need to add