draw.polys: Additional supporting functions for random Markov fields

View source: R/extraFunctions.R

draw.polysR Documentation

Additional supporting functions for random Markov fields

Description

This set of functions were useful in the past to get information and to plot maps but somehow now seem redundant.

Usage

draw.polys(polys, object = NULL, scheme = NULL, 
           swapcolors = FALSE, n.col = 100, ...)
polys2nb(polys)                 
nb2prec(neighbour,x,area=NULL)
polys2polys(object, neighbour.nb)
nb2nb(neighbour.nb)

Arguments

polys

an object containing the polygon information for the area

object

are either the values to plot in the draw.polys() function or a polygons information for a shape file for function polys2polys

scheme

scheme of colours to use, it can be "heat", "rainbow", "terrain", "topo", "cm" or any colour

swapcolors

to reverse the colours, it just work for "heat", "rainbow", "terrain", "topo", "cm" options

n.col

range for the colours

neighbour.nb

neighbour information for a shape file for function nb2nb

neighbour

the neighbour information, and if the neighbour is from S4 shape file than use nb2nb to transfer it to the appropriate neighbour for MRF(), MRFA(), mrf() and mrfa().

x

the factor defining the areas

area

all possible areas involved

...

for extra options

Details

draw.polys() plots the fitted values of fitted MRF object.

polys2nb() gets the neighbour information from the polygons.

nb2prec() creates the precision matrix from the neighbour information.

polys2polys() transforms a shape file polygons (S4 object) to the polygons required form for the functions MRF() and MRFA().

nb2nb() transforms from a shape file neighbour (S4 object) to the neighbour required form for functions MRF().

Value

The draw.polys() produces a plot while the rest of the functions produce required object for fitting or plotting.

Author(s)

Fernanda De Bastiani, Mikis Stasinopoulos, Robert Rigby and Vlasios Voudouris

Maintainer: Fernanda <fernandadebastiani@gmail.com>

References

De Bastiani, F. Rigby, R. A., Stasinopoulos, D. M., Cysneiros, A. H. M. A. and Uribe-Opazo, M. A. (2016) Gaussian Markov random spatial models in GAMLSS. Journal of Applied Statistics, pp 1-19.

Rigby, R. A. and Stasinopoulos D. M. (2005). Generalized additive models for location, scale and shape,(with discussion), Appl. Statist., 54, part 3, pp 507-554.

Rigby, R. A., Stasinopoulos, D. M., Heller, G. Z., and De Bastiani, F. (2019) Distributions for modeling location, scale, and shape: Using GAMLSS in R, Chapman and Hall/CRC. An older version can be found in https://www.gamlss.com/.

Rue and Held (2005) Gaussian markov random fields: theory and applications, Chapman & Hall, USA.

Stasinopoulos D. M. Rigby R.A. (2007) Generalized additive models for location scale and shape (GAMLSS) in R. Journal of Statistical Software, Vol. 23, Issue 7, Dec 2007, https://www.jstatsoft.org/v23/i07/.

Stasinopoulos D. M., Rigby R.A., Heller G., Voudouris V., and De Bastiani F., (2017) Flexible Regression and Smoothing: Using GAMLSS in R, Chapman and Hall/CRC.

(see also https://www.gamlss.com/).

See Also

MRF, MRFA


gamlss.spatial documentation built on Oct. 15, 2023, 5:06 p.m.