gwplm: This function implements basic geographically weighted panel...

Description Usage Arguments Examples

View source: R/gwplm.R

Description

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)

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
gwplm(
  SpDF,
  data,
  index,
  formula,
  bw,
  kernel,
  adaptive = F,
  dMat,
  effect = c("individual", "time", "twoways", "nested"),
  model = c("within", "random", "ht", "between", "pooling", "fd")
)

Arguments

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)

Examples

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)

LAEQ/gwpr documentation built on June 28, 2020, 8:23 p.m.