# GWPR.plmtest: Locally Breusch-Pagan Lagrange Multiplier Test Based on GWPR In GWPR.light: Geographically Weighted Panel Regression

## Description

This function perform Breusch-Pagan Lagrange Multiplier test in each regression based on different subsamples

## Usage

 ```1 2``` ```GWPR.plmtest(formula, data, index, SDF, bw = NULL, adaptive = FALSE, p = 2, kernel = "bisquare", longlat = FALSE) ```

## Arguments

 `formula` The regression formula: : Y ~ X1 + ... + Xk `data` A data.frame for the Panel data. `index` A vector for the indexes : (c("ID", "Time")). `SDF` Spatial*DataFrame on which is based the data, with the "ID" in the index. `bw` The optimal bandwidth, either adaptive or fixed distance. `adaptive` If TRUE, adaptive distance bandwidth is used, otherwise, fixed distance bandwidth. `p` The power of the Minkowski distance, default is 2, i.e. the Euclidean distance `kernel` bisquare: wgt = (1-(vdist/bw)^2)^2 if vdist < bw, wgt=0 otherwise (default); gaussian: wgt = exp(-.5*(vdist/bw)^2); exponential: wgt = exp(-vdist/bw); tricube: wgt = (1-(vdist/bw)^3)^3 if vdist < bw, wgt=0 otherwise; boxcar: wgt=1 if dist < bw, wgt=0 otherwise `longlat` If TRUE, great circle distances will be calculated

## Value

A list of result:

GW.arguments

a list class object including the model fitting parameters for generating the report file

SDF

a Spatial*DataFrame (either Points or Polygons, see sp) integrated with fit.points, test value, p value, df1, df2

## Author(s)

Chao Li <chaoli0394@gmail.com> Shunsuke Managi

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19``` ```data(TransAirPolCalif) data(California) formula.GWPR <- pm25 ~ co2_mean + Developed_Open_Space_perc + Developed_Low_Intensity_perc + Developed_Medium_Intensity_perc + Developed_High_Intensity_perc + Open_Water_perc + Woody_Wetlands_perc + Emergent_Herbaceous_Wetlands_perc + Deciduous_Forest_perc + Evergreen_Forest_perc + Mixed_Forest_perc + Shrub_perc + Grassland_perc + Pasture_perc + Cultivated_Crops_perc + pop_density + summer_tmmx + winter_tmmx + summer_rmax + winter_rmax #precomputed bandwidth bw.AIC.Fix <- 2.010529 GWPR.plmtest.resu.F <- GWPR.plmtest(formula = formula.GWPR, data = TransAirPolCalif, index = c("GEOID", "year"), SDF = California, bw = bw.AIC.Fix, adaptive = FALSE, p = 2, kernel = "bisquare", longlat = FALSE) library(tmap) tm_shape(GWPR.plmtest.resu.F\$SDF) + tm_polygons(col = "p.value", breaks = c(0, 0.05, 1)) ```

GWPR.light documentation built on Oct. 18, 2021, 5:09 p.m.