Learn R Programming

mgwrsar (version 0.1-1)

plot_mgwrsar: plot_mgwrsar plots the value of local paramaters of a mgwrsar models using a leaflet map.

Description

plot_mgwrsar plots the value of local paramaters of a mgwrsar models using a leaflet map.

Usage

plot_mgwrsar(model,type='coef',var=NULL,SP=NULL,SP_id=NULL,
proj=NULL,mypalette= "RdYlGn",opacity=1,fopacity=1,radius=1500)

Arguments

model

a mgwsar model.

type

default 'coef', for plotting the value of the coefficients. Local t-Student could also be plot using 't_coef'.

var

Names of variable to plot.

SP

A spdf object.

SP_id

Id regions for spdf object.

proj

A CRS projection.

mypalette

A leaflet palette.

opacity

Opacity of border color.

fopacity

Opacity of fill color.

radius

radius of circle for plot of points.

Value

A Interactive Web Maps with local parameters plot and Open Street Map layer.

See Also

MGWRSAR, bandwidths_mgwrsar, summary_mgwrsar, predict_mgwrsar, kernelW_C

Examples

Run this code
# NOT RUN {
library(mgwrsar)
data(mydata)
coord=as.matrix(mydata[,c("x_lat","y_lon")])
W=KNN(coord,4)
model_GWR<-MGWRSAR(formula = 'Y_gwr~X1+X2+X3', data = mydata, coord=coord,
fixed_vars=NULL,kernels=c('gauss'),H=0.13,
Model = 'GWR', control=list(SE=TRUE))
summary_mgwrsar(model_GWR)
plot_mgwrsar(model_GWR,type='t_coef',var='X1')
# }

Run the code above in your browser using DataLab