Help for package GWLelast (original) (raw)
| Type: | Package |
|---|---|
| Title: | Geographically Weighted Logistic Elastic Net Regression |
| Version: | 1.2.2 |
| Author: | Daisuke Yoneoka, Eiko Saito |
| Maintainer: | Daisuke Yoneoka blue.sky.sea.dy@gmail.com |
| 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>. |
| Depends: | R (≥ 3.0.1) |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| LazyData: | true |
| RoxygenNote: | 6.0.1 |
| Imports: | doParallel, geosphere, sp, spgwr, glmnet, foreach, methods, stats |
| NeedsCompilation: | no |
| Packaged: | 2019-02-10 12:37:26 UTC; daisuke |
| Repository: | CRAN |
| Date/Publication: | 2019-02-10 13:03:16 UTC |
GWLelast Geographically weighted logistic elastic net regression
Description
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.
GWLelast.cv.bw
Description
Cross validation for geographically weighted logistic elastic net regression
Usage
GWLelast.cv.bw(x = x, y = y, D = D, coords = coords, alpha = 1,
lambda = lambda, nlambda = nlambda, gweight = gweight,
longlat = longlat, bw = bw)
Arguments
| 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. |
Value
error Cross validation error.
GWLelast.est
Description
Fitting geographically weighted logistic elastic net regression
Usage
GWLelast.est(x, y, coords, D = NULL, alpha = 1, lambda = NULL,
nlambda = NULL, gweight = c("gwr.Gauss", "gwr.bisquare"),
longlat = TRUE, bw = bw)
Arguments
| 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. |
Value
model: Fitted model at location i.
error: Cross validation error.
GWLelast.inner
Description
Inner part of fitting GWLelast without parallel cores
Usage
GWLelast.inner(x = x, y = y, coords = coords, W = W, lambda = lambda,
alpha = 1, nlambda = nlambda)
Arguments
| 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. |
Value
model Fitted model at location i.
error Cross validation error.
GWLelast.sel.bw
Description
Bandwidth selection forgeographically weighted logistic elastic net regression
Usage
GWLelast.sel.bw(x, y, coords, D = NULL, alpha = 1, lambda = NULL,
nlambda = NULL, gweight = gweight, longlat = TRUE, lower.bw = NULL,
upper.bw = NULL)
Arguments
| 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. |
Value
optimal.bw Optimal bandwidth.
Examples
######################
# Need to add