Description Usage Arguments Value Examples
A function for bandwidth selection to calibrate a GWPR model, based on the mean over time of the data. Arguments of the function
1 2 3 4 5 6 7 8 9 10 |
formula |
Regression model formula : Y ~ X1 + ... + Xk |
data |
dataFrame for the Panel data |
index |
List for the indexes : (c(" ID, Time")) |
effect |
the effects introduced in the model, one of "individual", "time", or "twoways" (see plm::plm) |
model |
one of "pooling", "within", "between", "random", "fd", or "ht" (see plm::plm) |
kernel |
gaussian,exponential, bisquare, tricube, boxcar (see GWmodel::gw.weight) |
dMat |
a distance matrix or vector (Optional parameter, see GWmodel::gw.weight) |
bws |
bandwidths to be used for calculations of CV-score |
double
1 2 3 4 5 6 | data(USStates)
USStates@data$id <- c(1:length(unique(USStates@data[,"state"])))
data <- merge(USStates@data, Produc, by="state", all=True)
dMat <- GWmodel::gw.dist(sp::coordinates(USStates), p=2, longlat=FALSE)
Equation <- log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp
bwCV.A <- bw.CV.A(formula=Equation, data=data, index=c("id","year"), effect='individual', model="within", kernel="bisquare", dMat=dMat, bws=c(30:40))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.