Description Usage Arguments Examples
This function implements basic geographically weighted panel regression (GWPR) The function requires the plm packages Je pense que ce package est utile seulement si l'on imprime les effets individuels/temporels (indisponible pour le moment)
1 2 3 4 5 6 7 8 9 10 11 12 |
SpDF: |
large SpatialPolygonsdataFrame |
data: |
dataFrame for the Panel data |
index: |
List for the indexes : (c(" ID, Time")) |
formula: |
Regression model formula : Y ~ X1 + ... + Xk |
bw: |
bandwidth to be used (see GWmodel::gwr.basic) |
kernel: |
gaussian,exponential, bisquare, tricube, boxcar (see GWmodel::gw.weight) |
adaptive: |
TRUE or FALSE (see GWmodel::gw.weight) |
dMat: |
a distance matrix or vector (Optional parameter, see GWmodel::gw.weight) |
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) |
1 2 3 4 5 6 7 | 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))
result <- gwplm(SpDF=USStates, data=data, index=c("id", "year"),formula=Equation, bw = bwCV.A, kernel="bisquare", adaptive=T, effect="individual", model="within", dMat=dMat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.