| Title: | Generates an Artificial Population Based on the KBAABB Methodology |
|---|---|
| Description: | Provides tools for generating an artificial population based on a kNN-based approximation to the approximate Bayesian bootstrap (KBAABB). This methodology is described in White et al. (2025) <doi:10.1093/forestry/cpaf071>. |
| Authors: | Grayson W. White [aut, cre] (ORCID: <https://orcid.org/0000-0003-4993-2792>), Jerzy A. Wieczorek [aut], Leland Russell [aut], Samantha Schroeder [aut], Tracey S. Frescino [aut], Kelly S. McConville [aut] |
| Maintainer: | Grayson W. White <[email protected]> |
| License: | CC0 |
| Version: | 0.0.1 |
| Built: | 2026-10-22 11:25:06 UTC |
| Source: | https://github.com/graysonwhite/kbaabb |
kbaabb() generates an imputed population dataset based on
methodology introduced in White et al. (2025).
kbaabb( survey_data, population_data, formula, k = 10, strata = NULL, center_scale = TRUE, seed = NULL, keep_survey_id = TRUE, id_name = "survey_row_id", ... )kbaabb( survey_data, population_data, formula, k = 10, strata = NULL, center_scale = TRUE, seed = NULL, keep_survey_id = TRUE, id_name = "survey_row_id", ... )
survey_data |
A dataframe containing the survey data to be used for the
imputation (i.e. "the sample"). This dataframe must contain all variables
listed in |
population_data |
A dataframe containing the population data for
imputation to occur on (i.e. "the population"). This dataframe must contain
all auxiliary variables listed in |
formula |
The formula specified for imputation, taking the form
|
k |
Integer. The number of neighbors used in the |
strata |
Character. The name of a variable to be used for
stratification. If |
center_scale |
Logical. If |
seed |
A seed to be set for reproducibility. |
keep_survey_id |
Logical, should the rownames of the survey data which correspond to the imputed values be kept? Allows for a lookup of which rows were used for which imputed observations. |
id_name |
The name for the column containing the rownames in
|
... |
Currently ignored. For extendability. |
A kbaabb object including:
imputed_population_data: The population data
survey_data: Original sample data
k: Value for k
stratified: Indicator of if stratifying occured, as well as
strata: The stratifying variable
center_scale: If centering and scaling occured
formula: The formula used for population imputation
# KBAABB imputation for k = 5, stratifying by `tnt`: pop = kbaabb(survey_data = SJC_sample, population_data = SJC_population, formula = biomass ~ tcc + elev, k = 5, strata = "tnt", center_scale = TRUE, seed = 37) head(pop$imputed_population_data) # and without stratification pop = kbaabb(survey_data = SJC_sample, population_data = SJC_population, formula = biomass ~ tcc + elev, k = 5, seed = 37) head(pop$imputed_population_data) # or with multiple imputations pop = kbaabb(survey_data = SJC_sample, population_data = SJC_population, formula = biomass + measurement_year ~ tcc + elev, k = 5, strata = "tnt", seed = 37) head(pop$imputed_population_data)# KBAABB imputation for k = 5, stratifying by `tnt`: pop = kbaabb(survey_data = SJC_sample, population_data = SJC_population, formula = biomass ~ tcc + elev, k = 5, strata = "tnt", center_scale = TRUE, seed = 37) head(pop$imputed_population_data) # and without stratification pop = kbaabb(survey_data = SJC_sample, population_data = SJC_population, formula = biomass ~ tcc + elev, k = 5, seed = 37) head(pop$imputed_population_data) # or with multiple imputations pop = kbaabb(survey_data = SJC_sample, population_data = SJC_population, formula = biomass + measurement_year ~ tcc + elev, k = 5, strata = "tnt", seed = 37) head(pop$imputed_population_data)
An 'sf' object containing the polygon boundaries of San Juan County, Washington, USA.
SJC_boundarySJC_boundary
'SJC_boundary': A data frame and sf object with 124 rows and 2 columns:
Name of the island that the polygon represents.
'sf' geometry.
Population level data for each 90m pixel in San Juan County, Washington, USA. For more information on the auxiliary data, see Wieczorek et al. (2023+).
SJC_populationSJC_population
'SJC_population': A data frame and sf object with 55,570 rows and 5 columns:
Name of the island that the pixel occurs on.
Auxiliary data. Tree canopy cover value at given pixel.
Auxiliary data. Elevation value at given pixel.
Auxiliary data. Tree (2) and non-tree (1) layer.
'sf' geometry.
Survey data collected by the USDA Forest Service, Forest Inventory & Analysis Program (FIA). This dataset contains plot-level data for biomass as collected and reported by the FIA. Further, auxiliary data has been matched with this plot level data to match the population dataset.
SJC_sampleSJC_sample
'SJC_sample': A data frame and sf object with 25 rows and 8 columns:
Name of the island that the pixel occurs on.
Average biomass measurement calculated from ground-collected FIA data. Units: short tons/acre.
Auxiliary data. Tree canopy cover value at given FIA plot.
Auxiliary data. Elevation value at given FIA plot
Auxiliary data. Tree (2) and non-tree (1) value at a given FIA plot.
Year in which the FIA plot was measured.
Name of the island that the FIA plot is on.
'sf' geometry.