genspmap: Generate map

Description Usage Arguments Details Value Examples

View source: R/genspmap.R

Description

Generate an epidmap object with population distributed into spatial units laid on a n-by-n regular squared lattice grid.

Usage

1
genspmap(n = 5, P = 1000, p = 1, rho = 0, verbose = T)

Arguments

n

A positive integer. Grid dimension

P

Total number of individuals

p

A positive integer. People density for each tile - min/max - uniform distribution

rho

Spatial autocorrelation parameter

verbose

A logical

Details

Map generation

For the map generation we considered a population distributed into spatial units laid on a n-by-n regular squared lattice grid. Each square of the grid contains a number of individuals randomly drawn from a uniform distribution ranging between the two values contained in the vector p. This geographical representation is very general in that the map thus generated can represent, e. g., a city divided into blocks or a region divided into smaller spatial union or any other meaningful geographical partition.

Value

An epidmap object

Examples

1
2
3
4
5
6
## Not run: 
set.seed(12345)
map <- genspmap(n=5, p=c(10, 50))
print(map)

## End(Not run)

vincnardelli/epidsampler documentation built on Dec. 17, 2020, 6:25 p.m.