Learn R Programming

spmoran (version 0.1.5)

resf_qr: Spatial filter unconditional quantile regression

Description

This function estimates the spatial filter unconditional quantile regression (SF-UQR) model.

Usage

resf_qr( y, x = NULL, meig, tau = NULL, boot = TRUE, iter = 200 )

Arguments

y

Vector of explained variables (\(N\) x 1)

x

Matrix of explanatory variables (\(N\) x K). Default is NULL

meig

Moran's eigenvectors and eigenvalues. Output from meigen or meigen_f

tau

The quantile(s) to be estimated. It must be a number (or a vector of numbers) strictly between 0 and 1. By default, \(tau\) = c(0.1, 0.2, ..., 0.9)

boot

If it is TRUE, confidence intervals for regression coefficients are estimated by a semiparametric bootstrapping. Default is TRUE

iter

The number of bootstrap replications. Default is 200

Value

b

Matrix of estimated regression coefficients (\(K\) x \(Tau\))

r

Matrix of estimated random coefficients on Moran's eigenvectors (\(L\) x \(Tau\))

s

Vector of estimated shrinkage parameters (2 x \(Tau\)). The first element denotes the standard error of the spatially dependent component (shrink_sf_SE), and the second represents the spatial scale of the component (shrink_sf_alpha) (see Murakami and Griffith, 2015)

e

Vector whose elements are residual standard error (resid_SE) and adjusted quasi conditional R2 (quasi_adjR2(cond))

B

\(Tau\) matrices (\(K\) x 4) summarizing bootstrapped estimates for the regression coefficients Columns of these matrices consist of the estimated coefficients, the lower and upper bounds for the 95 percent confidencial intervals, and p-values. It is available if boot = TRUE

S

\(Tau\) matrices (2 x 3) summarizing bootstrapped estimates for the shrinkage parameters. Columns of these matrices consist of the estimated parameters, the lower and upper bounds for the 95 percent confidencial intervals. It is available if boot = TRUE

B0

List of \(Tau\) matrices (\(K\) x \(iter\)) summarizing bootstrapped coefficients.\(tau\)-th matrix consists of the coefficients on the \(tau\)-th quantile. It is available if boot = TRUE

S0

List of \(Tau\) matrices (2 x \(iter\)) summarizing bootstrapped shrinkage parameters. \(tau\)-th matrix consists of the parameters on the \(tau\)-th quantile. It is available if boot = TRUE

References

Murakami, D. and Seya, H. (2017) Spatially filtered unconditional quantile regression. ArXiv.

See Also

plot_qr

Examples

Run this code
# NOT RUN {
require(spdep)
data(boston)
y	<- boston.c[, "CMEDV" ]
x	<- boston.c[,c("CRIM","ZN","INDUS", "CHAS", "NOX","RM", "AGE",
                       "DIS" ,"RAD", "TAX", "PTRATIO", "B", "LSTAT")]
coords  <- boston.c[,c("LAT","LON")]
meig 	<- meigen(coords=coords)
res	<- resf_qr(y=y,x=x,meig=meig, boot=FALSE)
res$b
res$s
res$e
plot_qr(res,1) #The first explanatory vafriable (intercept)
plot_qr(res,2) #The second explanatory variable
plot_qr(res,1,"s") #shrink_sf_SE
plot_qr(res,2,"s") #shrink_sf_alpha

###Not run
#res	<- resf_qr(y=y,x=x,meig=meig, boot=TRUE)
#res$B
#res$S
#res$e
#plot_qr(res,1) #The first explanatory vafriable (intercept)
#plot_qr(res,2) #The second explanatory variable
#plot_qr(res,1,"s") #shrink_sf_SE
#plot_qr(res,2,"s") #shrink_sf_alpha
# }

Run the code above in your browser using DataLab