arealCI: Estimate Confidence Intervals (CI) for Areal Probability...

Description Usage Arguments Value Examples

View source: R/arealCI.R

Description

Calculate the mean, 95 deviation of areal units from an estimated probability field from a model.

Usage

1
2
arealCI(field, modelFit, polygonList = NULL, rWidth = NULL,
  draws = 1000, popDF = NULL)

Arguments

field

field object which simulated underlying data

modelFit

fitted model object from the field

polygonList

list, list of polygons to sample from

rWidth

integer, instead of using a polygon list divide the original bounding box into approximately equal sized squares with rWidth number squares along the x axis.

draws

int, number of draws for simulation to calculate CI's

popDF

data.frame, use population weights when aggrgating data

Value

data.frame, mean, CI, and sd of areal fields.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 

unitSim <- simField(
N = 200, rangeE = .7,
offset = c(0.1, 0.2), 
max.edge = c(0.1,0.2),
beta0 = -2,
betaList = list(
    list(type="random", value=2),
    list(type="spatial", value=-.5),
    list(type="cluster", value=-2)
))

pointDF <- samplePoints(unitSim, 500, 100)

unitFit <- runFieldModel(unitSim, pointDF)

head(arealCI(unitSim, unitFit, rWidth=3))


## End(Not run)

nmmarquez/PointPolygon documentation built on Dec. 10, 2020, 1:15 a.m.