impute_down_nuts {regions} | R Documentation |
Imputing Data From Larger To Smaller Units in the EU NUTS
Description
This is a special case of impute_down
for the EU NUTS
hierarchical typologies. All valid actual rows will be projected down
to all smaller constituent typologies where data is missing.
Usage
impute_down_nuts(
dat,
geo_var = "geo",
values_var = "values",
method_var = NULL,
nuts_year = 2016
)
Arguments
dat |
A data frame with exactly two or three columns: |
geo_var |
The variable that contains the geographical codes in the NUTS typologies, defaults to code"geo_var". |
values_var |
The variable that contains the upstream data to be
imputed to the downstream data, defaults to |
method_var |
The variable that contains the metadata on various
processing information, defaults to |
nuts_year |
The year of the NUTS typology to use, it defaults to the
currently valid |
Details
The more general function requires typology information from the higher and lower level typologies. This is not needed when the EU vocabulary is used, and the hierarchy can be established from the EU vocabularies.
Be mindful that while all possible imputations are made, imputations beyond one hierarchical level will result in very crude estimates.
The imputed dataset dat
must refer to a single time unit, i.e.
panel data is not supported.
Value
An augmented version of the dat
imputed data frame with all
possible projections to valid smaller units, i.e. NUTS0 = country
values
imputed to all missing NUTS1
units, NUTS1
values
imputed to all missing NUTS2
units, NUTS2
values
imputed to all missing NUTS3
units.
See Also
Other impute functions:
impute_down()
Examples
data(mixed_nuts_example)
impute_down_nuts(mixed_nuts_example, nuts_year = 2016)