Generates population data for generating 'Westfall' Ratio2Size estimates.
modWFpop(
popType = "VOL",
popTabs = popTables(),
popTabIDs = popTableIDs(),
popFilter = popFilters(),
pltassgn = NULL,
pltassgnid = "PLT_CN",
dsn = NULL,
pjoinid = "CN",
areawt = "CONDPROP_UNADJ",
adj = "samp",
unitvar = NULL,
unitarea = NULL,
areavar = "ACRES",
strata = TRUE,
stratalut = NULL,
strvar = "STRATUMCD",
savedata = FALSE,
saveobj = FALSE,
objnm = "GBpopdat",
unit_opts = NULL,
strata_opts = NULL,
savedata_opts = NULL,
GBdata = NULL,
pltdat = NULL,
stratdat = NULL,
auxdat = NULL,
gui = FALSE,
...
)
String. Type of evaluation(s) to include in population data. Note: currently only c('CURR', 'VOL', 'LULC', 'DWM') are available. See details below for descriptions of each.
List of population tables the user would like returned. See help(popTables) for a list of options.
List of unique IDs corresponding to the population tables that the user has requested. See help(popTableIDs) for a list of options.
List of population filters. See help(popFilters) for a list of options.
DF/DT, Optional. R object, sf R object, comma-delimited file(.csv), layer or spatial layer in dsn, or shapefile(.shp). Plot-level assignment of estimation unit and/or strata, with one record for each plot.
String.
String. Name of database where tree, cond, and plot-level tables reside. The dsn varies by driver. See gdal OGR vector formats (https://www.gdal.org/ogr_formats.html).
String. Join variable in plot to match pltassgnid. Does not need to be uniqueid. If using most current XY coordinates for plot assignments, use identifier for plot (e.g., PLOT_ID).
String. Name of variable for summarizing area weights (e.g., CONDPROP_UNADJ).
String. How to calculate adjustment factors for nonsampled (nonresponse) conditions based on summed proportions for by plot ('samp', 'plot'). 'samp' - adjustments are calculated at strata/estimation unit level; 'plot' - adjustments are calculated at plot-level. Adjustments are only calculated for annual inventory plots (DESIGNCD=1).
String. Name of the estimation unit variable in unitarea and cond or pltassgn data frame with estimation unit assignment for each plot (e.g., 'ESTN_UNIT'). Optional if only one estimation unit.
Numeric or DF. Total area by estimation unit. If only 1 estimation unit, include number of total acreage for the area of interest or a data frame with area and estimation unit. If more than one estimation unit, provide a data frame of total area by estimation unit, including unitvar and areavar.
String. Name of area variable in unitarea. Default="ACRES".
Logical. If TRUE, include information for post-stratification.
DF/DT. If strata=TRUE, look-up table with pixel counts or area by strata or proportion or area ('strwt') by strata (and estimation unit). If 'strwt' is not included, set getwt=TRUE and getwtvar as the name of variable to calculate weights from (e.g., pixel counts).
String. If strata=TRUE, name of the strata variable in stratalut and cond or pltassgn data frame with stratum assignment for each plot (Default = 'STRATUMCD').
Logical. If TRUE, saves table(s) to outfolder.
Logical. If TRUE, saves returned list object to outfolder.
String. Name of *.rds object.
List. See help(unit_options()) for a list of options.
List. See help(strata_options()) for a list of options. Only used when strata = TRUE.
List. See help(savedata_options()) for a list of options. Only used when savedata = TRUE.
R List object. Output data list components from FIESTA::anGBdata().
R List object. Output data list components from FIESTA::spGetPlots().
R List object. Output data list components from FIESTA::spGetStrata().
R List object. Output data list components from FIESTA::spGetAuxiliary().
Logical. If gui, user is prompted for parameters.
For extendibility.
A list with population data for Green-Book estimates.
Data frame. Condition-level data including plot-level assignment of estimation unit and stratum (if strata=TRUE), condition proportion adjustment factor (cadjfac), and adjusted condition proportions (CONDPROP_ADJ).
String. Unique identifier of plot in condx and pltcondx.
String. Unique identifier of condition in condx and pltcondx.
Data frame. Tree data within population, used for estimation, including trees per acre adjustment factor (tadjfac), and adjusted trees per acre (TPA_ADJ) (if treef is included).
String. Unique identifier of plot in treex (if treef is included).
String. If ACI=FALSE, ACI.filter="COND_STATUS_CD == 1".
String. Returned table of area by estimation unit.
String. Variable name for estimation unit.
String. Strata-level table with pixel counts by strata (P1POINTCNT), strata weights (strwt), number of plots by strata (n.strata), total number of plots in estimation unit (n.total), sum of condition proportions (_UNADJ_SUM), area adjustments (*_ADJFAC), total area, and area expansion by strata (EXPNS).
String. Variable name for strata. If strata=FALSE, strvar="ONESTRAT".
String. If ACI=FALSE, ACI.filter="COND_STATUS_CD == 1".
Data frame. Number of plots by PLOT_STATUS_CD.
Data frame. Number of conditions by COND_STATUS_CD.
String. State names in dataset.
String. Range of inventory years in dataset.
Data frame. Strata information by estimation unit.
Variable | Description | |
unitvar | estimation unit | |
strvar | stratum value | |
strwtvar | number of pixels by strata and estimation unit | |
n.strata | number of plots in strata (after totally nonsampled plots removed) | |
n.total | number of plots for estimation unit | |
strwt | proportion of area (or plots) by strata and estimation unit (i.e., strata weight) | |
CONDPROP_UNADJ_SUM | summed conditionproportion by strata and estimation unit | |
CONDPROP_ADJFAC | adjusted condition proportion by strata after nonsampled plots removed | |
AREA_USED | total area of estimation unit | |
expfac | strata-level expansion factor after nonsampled plots and conditions removed (AREA_USED/n.strata) | |
EXPNS | strata-level area expansions (expfac * strwt) |
Table(s) are also written to outfolder.
Population types
popType Description | ||
ALL | Population data, including nonsampled plots. | |
CURR | Population data for area estimates, excluding nonsampled plots. | |
VOL | Population data for area/tree estimates, excluding nonsampled plots. | |
LULC | Population data for land use/land cover transitional estimates, including only plots with previous measurements and excluding nonsampled plots. |
If variables are NULL, then it will prompt user to input variables.
Necessary variables:
Data | Variable | Description | |
tree | tuniqueid | Unique identifier for each plot in tree table. | |
CONDID | Unique identifier of each condition on plot. Set CONDID=1, if only 1 condition per plot. | ||
TPA_UNADJ | Number of trees per acre each sample tree represents (e.g., DESIGNCD=1: TPA_UNADJ=6.018046 for trees on subplot; 74.965282 for trees on microplot). | ||
cond | cuniqueid | Unique identifier for each plot in cond table. | |
CONDID | Unique identifier of each condition on plot. Set CONDID=1, if only 1 condition per plot. | ||
CONDPROP_UNADJ | Unadjusted proportion of condition on each plot. Set CONDPROP_UNADJ=1, if only 1 condition per plot. | ||
COND_STATUS_CD | Status of each forested condition on plot (i.e. accessible forest, nonforest, water, etc.) | ||
NF_COND_STATUS_CD | If ACI=TRUE. Status of each nonforest condition on plot (i.e. accessible nonforest, nonsampled nonforest) | ||
SITECLCD | If landarea=TIMBERLAND. Measure of site productivity. | ||
RESERVCD | If landarea=TIMBERLAND. Reserved status. | ||
SUBPROP_UNADJ | Unadjusted proportion of subplot conditions on each plot. Set SUBPROP_UNADJ=1, if only 1 condition per subplot. | ||
MICRPROP_UNADJ | If microplot tree attributes. Unadjusted proportion of microplot conditions on each plot. Set MICRPROP_UNADJ=1, if only 1 condition per microplot. | ||
MACRPROP_UNADJ | If macroplot tree attributes. Unadjusted proportion of macroplot conditions on each plot. Set MACRPROP_UNADJ=1, if only 1 condition per macroplot. | ||
pltassgn | pltassgnid | Unique identifier for each plot in pltassgn. | |
STATECD | Identifies state each plot is located in. | ||
INVYR | Identifies inventory year of each plot. | ||
PLOT_STATUS_CD | Status of each plot (i.e. sampled, nonsampled). If not included, all plots are assumed as sampled. |
For available reference tables: sort(unique(FIESTAutils::ref_codes$VARIABLE))
ADJUSTMENT FACTOR:
The adjustment factor is necessary to account for
nonsampled conditions. It is calculated for each estimation unit by strata.
by summing the unadjusted proportions of the subplot, microplot, and
macroplot (i.e. *PROP_UNADJ) and dividing by the number of plots in the
strata/estimation unit).
An adjustment factor is determined for each tree based on the size of the plot it was measured on. This is identified using TPA_UNADJ as follows:
PLOT SIZE | TPA_UNADJ | |
SUBPLOT | 6.018046 | |
MICROPLOT | 74.965282 | |
MACROPLOT | 0.999188 |
If ACI=FALSE, only nonsampled forest conditions are accounted for in the
adjustment factor.
If ACI=TRUE, the nonsampled nonforest conditions are
removed as well and accounted for in adjustment factor. This is if you are
interested in estimates for all lands or nonforest lands in the
All-Condition-Inventory.
unitcombine:
If TRUE and less than 2 plots in any one estimation unit,
all estimation units with 10 or less plots are combined. The current method
for combining is to group the estimation unit with less than 10 plots with
the estimation unit following in consecutive order (numeric or
alphabetical), restrained by survey unit (UNITCD) if included in dataset,
and continuing until the number of plots equals 10. If there are no
estimation units following in order, it is combined with the estimation unit
previous in order.
stratcombine:
If TRUE and less than 2 plots in any one strata class
within an estimation unit, all strata classes with 2 or less plots are
combined. The current method for combining is to group the strata with less
than 2 plots with the strata class following in consecutive order (numeric
or alphabetical), restrained by estimation unit (if unitcombine=FALSE), and
continuing until the number of plots equals 10. If there are no strata
classes following in order, it is combined with the estimation unit previous
in order.
Scott, Charles T.; Bechtold, William A.; Reams, Gregory A.; Smith, William D.; Westfall, James A.; Hansen, Mark H.; Moisen, Gretchen G. 2005. Sample-based estimators used by the Forest Inventory and Analysis national information management system. Gen. Tech. Rep. SRS-80. Asheville, NC: U.S. Department of Agriculture, Forest Service, Southern Research Station, p.53-77.