aggPixelPreds: Helper function of 'pixelPopToArea'

View source: R/simPop.R

aggPixelPredsR Documentation

Helper function of pixelPopToArea

Description

Aggregates population from the pixel level to the level of the area of interest.

Usage

aggPixelPreds(
  Zg,
  Ng,
  areas,
  urban = targetPopMat$urban,
  targetPopMat = NULL,
  useDensity = FALSE,
  stratifyByUrban = TRUE,
  normalize = useDensity
)

Arguments

Zg

nIntegrationPoint x nsim matrix of simulated response (population numerators) for each pixel and sample

Ng

nIntegrationPoint x nsim matrix of simulated counts (population denominators) for each pixel and sample

areas

nIntegrationPoint length character vector of areas (or subareas)

urban

nIntegrationPoint length vector of indicators specifying whether or not pixels are urban or rural

targetPopMat

same as in simPopCustom

useDensity

whether to use population density as aggregation weights.

stratifyByUrban

whether or not to stratify simulations by urban/rural classification

normalize

if TRUE, pixel level aggregation weights within specified area are normalized to sum to 1. This produces an average of the values in Zg rather than a sum. In general, should only be set to TRUE for smooth integrals of risk.


martinbryan/SUMMER documentation built on April 10, 2024, 5:03 a.m.