SpatialVS: Function for spatial variable selection

Description Usage Arguments Value References Examples

View source: R/spatialVS.R

Description

Perform variable selection for the spatial Poisson regression model under adaptive elastic net penalty.

Usage

1
2
3
SpatialVS(dat.obj, alpha.vec = seq(0.6, 1, by = 0.05),
  lambda.vec = seq(0.15, 1, len = 50), method = "PQL", plots = F,
  intercept = T, verbose = T)

Arguments

dat.obj

List, input data. Must contains:

  1. X numeric matrix, the covariates.

  2. y integer vector, the response in counts.

  3. dist numeric matrix, the distance matrix.

  4. offset numeric vector, the offset item.

alpha.vec

numeric vector, a vector of possible values of regularization parameter. The range is [0,1].

lambda.vec

numeric vector, a vector of positive values of regularization parameter.

method

string, the method to be used. Options are:

  1. "PQL" penalized quasi-likelihood method that considers spatial correlation.

  2. "PQL.nocor" penalized quasi-likelihood method that ignores spatial correlation.

  3. "APL" approximate penalized loglikelihood method that considers spatial correlation.

  4. "APL.nocor" approximate penalized loglikelihood method that ignores spatial correlation.

plots

bool, if True, contour plot of AIC/BIC values is generated.

intercept

bool, if True, an intercept item will be included in model.

verbose

bool, if True, various updates are printed during each iteration of the algorithm.

Value

A list of 13 items:

  1. dat.obj, List, a copy of the dat.obj input.

  2. start, Initial values of parameters given by glmmPQL().

  3. L.obj, Regression coefficients under each alpha.vec and lambda.vec, under the adaptive elastic net.

  4. Lout.obj, AIC and BIC values under each L.obj value, under the adaptive elastic net.

  5. contour.out.obj, Object used to generate contour plot as a function of alpha.vec and lambda.vec, with AIC or BIC as the output. Used to choose best penalty parameter, under the adaptive elastic net.

  6. L.best.obj, Model fitting results under the best chosen alpha.vec and lambda.vec, under the adaptive elastic net.

  7. Lout.best.obj, Best BIC value for L.best.obj.

  8. L.EN.obj, Lout.EN.obj, contour.out.EN.obj, L.EN.best.obj, Similar items but under the elastic penalty.

  9. lasso.weight, Numeric, specifies the adaptive Lasso weight.

  10. method, String, the method used for computing the approximate likelihood function.

References

Xie, Y., Xu, L., Li, J., Deng, X., Hong, Y., Kolivras, K., and Gaines, D. N. (2018). Spatial Variable Selection and An Application to Virginia Lyme Disease Emergence. Preprint, arXiv:1809.06418 [stat.AP].

Examples

1
2
3
4
5
6
#use small.test.dat as the input to fit the spatial Poisson regression model.
#a grid of alpha.vec and lambda.vec is typically used.
#Here one point of alpha.vec and lambda.vec is used for fast illustration.

test.fit<-SpatialVS(dat.obj=small.test.dat, alpha.vec=0.5,
lambda.vec=5, method="PQL", intercept=TRUE, verbose=FALSE)

SpatialVS documentation built on May 2, 2019, 2:14 p.m.