err_check_inputs_pop: Error check inputs for population downscaling

View source: R/err_check_input.R

err_check_inputs_popR Documentation

Error check inputs for population downscaling

Description

Error check inputs for population downscaling

Usage

err_check_inputs_pop(
  targets,
  xmat,
  betas,
  xmat.coltypes,
  xmat.proj,
  xmat.dyn.fun,
  err.txt
)

Arguments

targets

A dataframe with columns times, lu.from (optional), lu.to and value (all targets >= 0)

xmat

A dataframe of explanatory variables with columns ks and value

betas

A dataframe of coefficients with columns ks, lu.from (optional), lu.to & value

xmat.coltypes

A dataframce with columns ks and string value, can be either "static", "dynamic", or "projected"

xmat.proj

dataframe with columns times, ns, ks, must be present for each xmat.coltype specified as projected

xmat.dyn.fun

function providing update for dynamic xmat columns, must take as arguments res, curr.areas, priors, xmat.proj must return ns x ks(dynamic) columns

priors

A dataframe of priors (if no betas were supplied) with columns ns, lu.from (optional), lu.to (with priors >= 0)

restrictions

A dataframe with columns ns, lu.from (optional), lu.to and value. Values must be zero or one. If restrictions are one, the MNL function is set to zero

Internal function. Must throw errors, no return value if inputs do not match the specification. Handle all error checking here Use this for all error checking of inputs.


tkrisztin/downscalr documentation built on June 2, 2025, 1:16 a.m.