plot_mgwrsar: plot_mgwrsar plots the value of local paramaters of a mgwrsar...

View source: R/plot.mgwrsar.R

plot_mgwrsarR Documentation

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,crs=NULL,mypalette= "RdYlGn",opacity=0.5
,fopacity=0.5,nbins=8,radius=500,mytile='Stamen.TonerBackground',myzoom=8,
myresolution=150,LayersControl=TRUE,myzoomControl=TRUE,mytile2=NULL,ScaleBar=NULL,
ScaleBarOptions=list(maxWidth = 200, metric = TRUE,imperial = FALSE,
updateWhenIdle = TRUE),MyLegendTitle=NULL,lopacity=0.5)

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', residuals using 'residuals' and fitted using 'fitted'.

var

Names of variable to plot.

crs

A CRS projection.

mypalette

A leaflet palette.

opacity

Opacity of border color.

fopacity

Opacity of fill color.

nbins

nbins.

radius

radius of circle for plot of points.

mytile

tile 1.

myzoom

level of zoom for tile 1.

myresolution

resolution for tile 1.

LayersControl

layers contols.

myzoomControl

zoem control.

mytile2

tile 2.

ScaleBar

ScaleBar.

ScaleBarOptions

options for ScaleBar.

MyLegendTitle

Legend title.

lopacity

opacity for legend.

Value

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

See Also

MGWRSAR, bandwidths_mgwrsar, summary_mgwrsar, predict_mgwrsar, kernel_matW

Examples


 library(mgwrsar)
 ## loading data example
 data(mydata)
 coord=as.matrix(mydata[,c("x_lat","y_lon")])
 ## Creating a spatial weight matrix (sparce dgCMatrix)
 ## of 4 nearest neighbors with 0 in diagonal
 model_GWR0<-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_GWR0)
 plot_mgwrsar(model_GWR0,type='B_coef',var='X2')
 plot_mgwrsar(model_GWR0,type='t_coef',var='X2')


mgwrsar documentation built on April 17, 2023, 9:09 a.m.