Generates population data for generating model-assisted estimation. Plots that are totally nonsampled are excluded from estimation dataset. Next, an adjustment factor is calculated by strata (if MAmethod="PS") or by estimation unit to adjust for nonsampled (nonresponse) conditions that have proportion less than 1. Attributes adjusted to a per-acre value are summed by plot, divided by the adjustment factor, and averaged by stratum and/or estimation unit. Note: population data must be generated by MA method.

modMApop(
  popType = "VOL",
  popTabs = popTables(),
  popTabIDs = popTableIDs(),
  popFilter = popFilters(),
  pltassgn = NULL,
  pltassgnid = "PLT_CN",
  dsn = NULL,
  pjoinid = "CN",
  areawt = "CONDPROP_UNADJ",
  adjplot = TRUE,
  unitvar = NULL,
  unitarea = NULL,
  areavar = "ACRES",
  unitzonal = NULL,
  prednames = NULL,
  predfac = NULL,
  standardize = TRUE,
  returndata = TRUE,
  savedata = FALSE,
  saveobj = FALSE,
  objnm = "MApopdat",
  unit_opts = NULL,
  savedata_opts = NULL,
  MAdata = NULL,
  pltdat = NULL,
  auxdat = NULL,
  gui = FALSE,
  ...
)

Arguments

popType

String. Type of evaluation(s) to include in population data. Note: currently only c('CURR', 'VOL', 'LULC') are available. See details below for descriptions of each.

popTabs

List of population tables the user would like returned. See help(popTables) for a list of options.

popTabIDs

List of unique IDs corresponding to the population tables that the user has requested. See help(popTableIDs) for a list of options.

popFilter

List of population filters. See help(popFilters) for a list of options.

pltassgn

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.

pltassgnid

String.

dsn

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).

pjoinid

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).

areawt

String. Name of variable for summarizing area weights (e.g., CONDPROP_UNADJ).

adjplot

Logical. If TRUE, adjusts for nonresponse at plot-level.

unitvar

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.

unitarea

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.

areavar

String. Name of area variable in unitarea. Default="ACRES".

unitzonal

DF/DT. Table with zonal auxiliary information by estimation unit. For continuous data, means by estimation unit; for categorical data, proportion of class by estimation unit.

prednames

String vector. Name(s) of predictor variables to include in model.

predfac

String vector. Name(s) of prednames that are factors (i.e., categorical). Names will change in output depending on number of categories.

standardize

Logical. If TRUE, predictors are standardized.

returndata

Logical. If TRUE, returns data objects.

savedata

Logical. If TRUE, saves table(s) to outfolder.

saveobj

Logical. If TRUE, saves returned list object to outfolder.

objnm

String. Name of *.rds object.

unit_opts

List. See help(unit_options()) for a list of options.

savedata_opts

List. See help(savedata_options()) for a list of options. Only used when savedata = TRUE.

MAdata

List. Data output from FIESTA::MAdata().

pltdat

R List object. Output data list components from FIESTA::spGetPlots().

auxdat

List. Auxiliary data output from FIESTA::spGetAuxiliary().

gui

Logical. If gui, user is prompted for parameters.

...

For extendibility.

Value

A list with population data for Green-Book estimates.

condx

Data frame. Condition-level data including plot-level assignment of estimation unit and stratum (if strata=TRUE) and adjusted condition proportion.

pltcondx

Data frame. Condition-level data, merged with plot data.

cuniqueid

String. Unique identifier of plot in condx and pltcondx.

condid

String. Unique identifier of condition in condx and pltcondx.

treex

Data frame. If esttype='TREE', tree-level data, including sample adjustment factor.

tuniqueid

String. If esttype='TREE', unique identifier of plot in treex.

ACI.filter

String. If ACI=FALSE, ACI.filter="COND_STATUS_CD == 1" .

unitarea

String. Returned table of area by estimation unit.

unitvar

String. Variable name for estimation unit.

expcondtab

String. If ACI=FALSE, ACI.filter="COND_STATUS_CD == 1".

plotsampcnt

Data frame. Number of plots by PLOT_STATUS_CD.

condsampcnt

Data frame. Number of conditions by COND_STATUS_CD.

states

String. State names in dataset.

invyrs

String. Range of inventory years in dataset.

VariableDescription
unitvarestimation unit
n.totalnumber of plots for estimation unit
CONDPROP_UNADJ_SUMsummed condition proportion by strata and estimation unit
CONDPROP_ADJFACadjusted condition proportion by strata after nonsampled plots removed
AREA_USEDtotal area of estimation unit
expfacstrata-level expansion factor after nonsampled plots and conditions removed (AREA_USED/n.strata)
EXPNSstrata-level area expansions (expfac * strwt)

Table(s) are also written to outfolder.

Details

If variables are NULL, then it will prompt user to input variables.

Necessary variables:

DataVariableDescription
treetuniqueidUnique identifier for each plot, to link to pltassgn (e.g. PLT_CN).
CONDIDUnique identifier of each condition on plot, to link to cond. Set CONDID=1, if only 1 condition per plot.
TPA_UNADJNumber 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).
condcuniqueidUnique identifier for each plot, to link to pltassgn (e.g. PLT_CN).
CONDIDUnique identifier of each condition on plot. Set CONDID=1, if only 1 condition per plot.
CONDPROP_UNADJUnadjusted proportion of condition on each plot. Set CONDPROP_UNADJ=1, if only 1 condition per plot.
COND_STATUS_CDStatus of each forested condition on plot (i.e. accessible forest, nonforest, water, etc.)
NF_COND_STATUS_CDIf ACI=TRUE. Status of each nonforest condition on plot (i.e. accessible nonforest, nonsampled nonforest)
SITECLCDIf landarea=TIMBERLAND. Measure of site productivity.
RESERVCDIf landarea=TIMBERLAND. Reserved status.
SUBPROP_UNADJUnadjusted proportion of subplot conditions on each plot. Set SUBPROP_UNADJ=1, if only 1 condition per subplot.
MICRPROP_UNADJIf microplot tree attributes. Unadjusted proportion of microplot conditions on each plot. Set MICRPROP_UNADJ=1, if only 1 condition per microplot.
MACRPROP_UNADJIf macroplot tree attributes. Unadjusted proportion of macroplot conditions on each plot. Set MACRPROP_UNADJ=1, if only 1 condition per macroplot.
pltassgnpuniqueidUnique identifier for each plot, to link to cond (e.g. CN).
STATECDIdentifies state each plot is located in.
INVYRIdentifies inventory year of each plot.
PLOT_STATUS_CDStatus 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))

Note

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 SIZETPA_UNADJ
SUBPLOT6.018046
MICROPLOT74.965282
MACROPLOT0.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.

References

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.

Author

Tracey S. Frescino, Paul L. Patterson

Examples

# \donttest{
# NOTE: FIA data objects used in these examples are stored in `FIESTA`, but
# can be generated for populations of interest by the user with functions in
# `FIESTA` such as `spGetPlots()`, `spGetAuxiliary()`, etc. For more
# information, see `FIESTA`'s extensive vignettes.
 
# Population data for counties in Wyoming
modMApop(popTabs = list(tree = FIESTA::WYtree,
                        cond = FIESTA::WYcond),
         pltassgn = FIESTA::WYpltassgn,
         pltassgnid = "CN",
         unitarea = FIESTA::WYunitarea,
         unitvar = "ESTN_UNIT",
         unitzonal = FIESTA::WYunitzonal,
         prednames = c("dem", "tcc", "tpi", "tnt"),
         predfac = "tnt")
#> INTENSITY not in dataset.. assuming single intensity plots
#> DESIGNCD not in dataset.. assuming DESIGNCD = 1 (annual inventory)
#> For FIA estimation, adjustment factors are calculated to account for plots with partial nonresponse.
#> ...there are 14 nonsampled forest conditions in the dataset.
#> filter removed 14 records: COND_STATUS_CD != 5
#> $module
#> [1] "MA"
#> 
#> $popType
#> [1] "VOL"
#> 
#> $condx
#>               PLT_CN CONDID CONDPROP_UNADJ SUBPPROP_UNADJ MICRPROP_UNADJ
#>    1: 40404728010690      1              1              1              1
#>    2: 40404729010690      1              1              1              1
#>    3: 40404730010690      1              1              1              1
#>    4: 40404731010690      1              1              1              1
#>    5: 40404733010690      1              1              1              1
#>   ---                                                                   
#> 3206: 40407866010690      1              1              1              1
#> 3207: 40407867010690      1              1              1              1
#> 3208: 40407868010690      1              1              1              1
#> 3209: 40407869010690      1              1              1              1
#> 3210: 46792188020004      1              1              1              1
#>       MACRPROP_UNADJ ESTN_UNIT  dem tcc     tpi tnt2 cadjfac ADJ_FACTOR_SUBP
#>    1:             NA         1 2372   0  10.625    1       1               1
#>    2:             NA         1 2382   5   0.750    1       1               1
#>    3:             NA         1 2274  45 -12.125    0       1               1
#>    4:             NA         1 2203   0  -0.125    1       1               1
#>    5:             NA         1 2276   0   1.250    1       1               1
#>   ---                                                                       
#> 3206:             NA        45 1248   2   0.125    1       1               1
#> 3207:             NA        45 1286   0   2.875    1       1               1
#> 3208:             NA        45 1272   0   1.875    1       1               1
#> 3209:             NA        45 1209   0   1.250    1       1               1
#> 3210:             NA        29 2165  13   0.500    1       1               1
#>       ADJ_FACTOR_MACR ADJ_FACTOR_MICR CONDPROP_ADJ
#>    1:               0               1            1
#>    2:               0               1            1
#>    3:               0               1            1
#>    4:               0               1            1
#>    5:               0               1            1
#>   ---                                             
#> 3206:               0               1            1
#> 3207:               0               1            1
#> 3208:               0               1            1
#> 3209:               0               1            1
#> 3210:               0               1            1
#> 
#> $pltcondx
#>               PLT_CN STATECD UNITCD COUNTYCD INVYR PLOT_STATUS_CD MEASYEAR
#>    1: 40404728010690      56      2        1  2013              2     2013
#>    2: 40404729010690      56      2        1  2011              1     2011
#>    3: 40404730010690      56      2        1  2013              1     2013
#>    4: 40404731010690      56      2        1  2012              2     2012
#>    5: 40404733010690      56      2        1  2012              2     2012
#>   ---                                                                     
#> 3206: 40407866010690      56      3       45  2011              2     2011
#> 3207: 40407867010690      56      3       45  2012              2     2012
#> 3208: 40407868010690      56      3       45  2011              2     2011
#> 3209: 40407869010690      56      3       45  2013              2     2013
#> 3210: 46792188020004      56      1       29  2012              1     2012
#>       RDDISTCD CONDID COND_NONSAMPLE_REASN_CD OWNCD OWNGRPCD RESERVCD SITECLCD
#>    1:       NA      1                      NA    46       40        0       NA
#>    2:        1      1                      NA    46       40        0        7
#>    3:        6      1                      NA    11       10        0        6
#>    4:       NA      1                      NA    22       20        0       NA
#>    5:       NA      1                      NA    46       40        0       NA
#>   ---                                                                         
#> 3206:       NA      1                      NA    46       40        0       NA
#> 3207:       NA      1                      NA    46       40        0       NA
#> 3208:       NA      1                      NA    12       10        0       NA
#> 3209:       NA      1                      NA    46       40        0       NA
#> 3210:        8      1                      NA    11       10        1        6
#>       STDORGCD ADFORCD LIVE_CANOPY_CVR_PCT COND_STATUS_CD NF_COND_STATUS_CD
#>    1:       NA      NA                   0              2                NA
#>    2:        0      NA                  17              1                NA
#>    3:        0     206                  41              1                NA
#>    4:       NA      NA                   0              2                NA
#>    5:       NA      NA                   0              2                NA
#>   ---                                                                      
#> 3206:       NA      NA                   0              2                NA
#> 3207:       NA      NA                   0              2                NA
#> 3208:       NA     206                   1              2                NA
#> 3209:       NA      NA                   0              2                NA
#> 3210:        0     214                  48              1                NA
#>       FORTYPCD STDSZCD STDAGE GSSTKCD DSTRBCD1 DSTRBYR1 DSTRBCD2 DSTRBYR2
#>    1:       NA      NA     NA      NA       NA       NA       NA       NA
#>    2:      366       1     46       5        0       NA        0       NA
#>    3:      201       1    220       3        0       NA        0       NA
#>    4:       NA      NA     NA      NA       NA       NA       NA       NA
#>    5:       NA      NA     NA      NA       NA       NA       NA       NA
#>   ---                                                                    
#> 3206:       NA      NA     NA      NA       NA       NA       NA       NA
#> 3207:       NA      NA     NA      NA       NA       NA       NA       NA
#> 3208:       NA      NA     NA      NA       NA       NA       NA       NA
#> 3209:       NA      NA     NA      NA       NA       NA       NA       NA
#> 3210:      201       1    109       3        0       NA        0       NA
#>       FORTYPGRPCD TIMBERCD
#>    1:          NA       NA
#>    2:         360        2
#>    3:         200        1
#>    4:          NA       NA
#>    5:          NA       NA
#>   ---                     
#> 3206:          NA       NA
#> 3207:          NA       NA
#> 3208:          NA       NA
#> 3209:          NA       NA
#> 3210:         200        1
#> 
#> $cuniqueid
#> [1] "PLT_CN"
#> 
#> $condid
#> [1] "CONDID"
#> 
#> $ACI.filter
#> [1] "COND_STATUS_CD == 1"
#> 
#> $unitarea
#>     ESTN_UNIT   ACRES
#>  1:         1 2757613
#>  2:         3 2021729
#>  3:         5 3072988
#>  4:         7 5096959
#>  5:         9 2729653
#>  6:        11 1837124
#>  7:        13 5930088
#>  8:        15 1428579
#>  9:        17 1283969
#> 10:        19 2671802
#> 11:        21 1720074
#> 12:        23 2616954
#> 13:        25 3440445
#> 14:        27 1681849
#> 15:        29 4459826
#> 16:        31 1350969
#> 17:        33 1617318
#> 18:        35 3158807
#> 19:        37 6714319
#> 20:        39 2701941
#> 21:        41 1336034
#> 22:        43 1435352
#> 23:        45 1536038
#>     ESTN_UNIT   ACRES
#> 
#> $areavar
#> [1] "ACRES"
#> 
#> $areaunits
#> [1] "acres"
#> 
#> $unitvar
#> [1] "ESTN_UNIT"
#> 
#> $unitvars
#> [1] "ESTN_UNIT"
#> 
#> $unitlut
#>     ESTN_UNIT STATECD COUNTYCD      dem        tcc           tpi      tnt2
#>  1:         1      56        1 2272.926  6.8530714  1.609176e-03 0.8264999
#>  2:         3      56        3 1647.743  7.9022732 -3.102019e-04 0.8487313
#>  3:         5      56        5 1367.107  2.4578633  6.003826e-04 0.9712791
#>  4:         7      56        7 2223.276  7.5236266  2.878460e-04 0.8371048
#>  5:         9      56        9 1653.929  3.4596989 -8.139182e-04 0.9143781
#>  6:        11      56       11 1300.595 13.3583927 -5.464502e-04 0.7278258
#>  7:        13      56       13 2143.260  6.3990155 -1.475728e-03 0.8390603
#>  8:        15      56       15 1413.315  1.3503086  2.232418e-04 0.9810094
#>  9:        17      56       17 1873.567  4.1191205  2.687428e-03 0.8347314
#> 10:        19      56       19 1695.213  9.4401841  8.285926e-04 0.8252693
#> 11:        21      56       21 1825.512  1.0998002 -2.754466e-04 0.9865623
#> 12:        23      56       23 2255.494 13.0094837 -4.589611e-04 0.7331014
#> 13:        25      56       25 1852.164  2.0670811  1.118535e-03 0.9522421
#> 14:        27      56       27 1380.878  0.9419578  5.522725e-04 0.9530363
#> 15:        29      56       29 2291.932 16.5713373  1.204469e-04 0.5766464
#> 16:        31      56       31 1572.269  3.3209321 -6.538782e-04 0.9248072
#> 17:        33      56       33 1570.581 14.7374346  3.234996e-04 0.7161021
#> 18:        35      56       35 2446.198 10.6072114  4.068747e-03 0.7608623
#> 19:        37      56       37 2091.513  0.8143151  3.665207e-05 0.9848022
#> 20:        39      56       39 2453.499 29.5642925 -5.082770e-04 0.3635238
#> 21:        41      56       41 2209.581  5.0478339 -1.207306e-03 0.8907651
#> 22:        43      56       43 1595.071  5.1797763 -2.165427e-03 0.8993017
#> 23:        45      56       45 1358.073  4.2119798 -1.588204e-03 0.8877382
#>     ESTN_UNIT STATECD COUNTYCD      dem        tcc           tpi      tnt2
#>     n.total
#>  1:     133
#>  2:      98
#>  3:     152
#>  4:     245
#>  5:     133
#>  6:      85
#>  7:     290
#>  8:      70
#>  9:      58
#> 10:     128
#> 11:      86
#> 12:     132
#> 13:     175
#> 14:      79
#> 15:     216
#> 16:      64
#> 17:      82
#> 18:     158
#> 19:     339
#> 20:     125
#> 21:      63
#> 22:      63
#> 23:      73
#>     n.total
#> 
#> $plotsampcnt
#>                                                            PLOT_STATUS_NM
#> 1 Sampled - at least one accessible forest land condition present on plot
#> 2           Sampled - no accessible forest land condition present on plot
#>   PLOT_STATUS_CD NBRPLOT
#> 1              1     556
#> 2              2    2491
#> 
#> $condsampcnt
#>    COND_STATUS_NM COND_STATUS_CD NBRCOND
#> 1     Forest land              1     590
#> 2  Nonforest land              2    2590
#> 3 Noncensus water              3      10
#> 4    Census water              4      20
#> 5      Nonsampled              5      14
#> 
#> $npixels
#>     ESTN_UNIT npixels
#>  1:         1 1376714
#>  2:         3 1010229
#>  3:         5 1538394
#>  4:         7 2546066
#>  5:         9 1362852
#>  6:        11  915454
#>  7:        13 2961420
#>  8:        15  713352
#>  9:        17  641459
#> 10:        19 1334190
#> 11:        21  859967
#> 12:        23 1308662
#> 13:        25 1720554
#> 14:        27  841523
#> 15:        29 2228161
#> 16:        31  675011
#> 17:        33  807188
#> 18:        35 1577267
#> 19:        37 3355881
#> 20:        39 1349166
#> 21:        41  668120
#> 22:        43  717122
#> 23:        45  767376
#>     ESTN_UNIT npixels
#> 
#> $npixelvar
#> [1] "npixels"
#> 
#> $states
#> [1] "Wyoming"
#> 
#> $invyrs
#> $invyrs$Wyoming
#> [1] 2011 2012 2013
#> 
#> 
#> $estvar.area
#> [1] "CONDPROP_ADJ"
#> 
#> $adj
#> [1] "plot"
#> 
#> $treex
#>                PLT_CN CONDID SUBP TREE STATUSCD SPCD SPGRPCD  DIA HT TREECLCD
#>     1: 40404729010690      1    1    2        1   66      23 10.8 14        3
#>     2: 40404729010690      1    4    3        1   66      23 11.6 19        3
#>     3: 40404729010690      1    1    1        2  113      24  7.7 18        3
#>     4: 40404729010690      1    1    3        2  113      24  5.2 23        3
#>     5: 40404729010690      1    1    4        1  113      24  5.2 18        2
#>    ---                                                                       
#> 18376: 46792188020004      1    4   13        1  202      10  7.0 26        2
#> 18377: 46792188020004      1    4   14        2  202      10 11.4 53        3
#> 18378: 46792188020004      1    4   15        2  202      10 10.6 46        3
#> 18379: 46792188020004      1    4   16        2  202      10  6.3 41        3
#> 18380: 46792188020004      1    4   17        1  202      10  1.9  8        3
#>        AGENTCD STANDING_DEAD_CD  VOLCFNET  VOLCFGRS VOLBFNET TPA_UNADJ
#>     1:      NA               NA  3.411463  3.411463       NA  6.018046
#>     2:      NA               NA  5.623683  5.797611       NA  6.018046
#>     3:      10                1  1.067166  1.940302       NA  6.018046
#>     4:      10                1  0.381894  0.694352       NA  6.018046
#>     5:      NA               NA  0.316063  0.316063       NA  6.018046
#>    ---                                                                
#> 18376:      NA               NA  2.125580  2.125580       NA  6.018046
#> 18377:      NA                1 15.149782 15.149782       NA  6.018046
#> 18378:      NA                1 11.160959 11.160959       NA  6.018046
#> 18379:      NA                1  2.945213  2.945213       NA  6.018046
#> 18380:      NA               NA        NA        NA       NA 74.965282
#>         DRYBIO_AG  CARBON_AG         BA TPROP_BASIS tadjfac
#>     1:  94.516629  47.258315 0.63615456        SUBP       1
#>     2: 155.807512  77.903756 0.73389024        SUBP       1
#>     3:  30.761698  15.380849 0.32336766        SUBP       1
#>     4:  11.305782   5.652891 0.14747616        SUBP       1
#>     5:  11.210763   5.605382 0.14747616        SUBP       1
#>    ---                                                     
#> 18376:  88.388202  44.194101 0.26724600        SUBP       1
#> 18377: 305.250275 152.625138 0.70880184        SUBP       1
#> 18378: 225.732139 112.866070 0.61281144        SUBP       1
#> 18379:  61.586094  30.793047 0.21646926        SUBP       1
#> 18380:   5.065642   2.532821 0.01968894        MICR       1
#> 
#> $tuniqueid
#> [1] "PLT_CN"
#> 
#> $adjtree
#> [1] FALSE
#> 
#> $prednames
#> [1] "dem"  "tcc"  "tpi"  "tnt2"
#> 
#> $predfac
#> [1] "tnt"
#> 
         
# Adding seedling data as well
modMApop(popTabs = list(tree = FIESTA::WYtree,
                        cond = FIESTA::WYcond,
                        seed = FIESTA::WYseed),
         pltassgn = FIESTA::WYpltassgn,
         pltassgnid = "CN",
         unitarea = FIESTA::WYunitarea,
         unitvar = "ESTN_UNIT",
         unitzonal = FIESTA::WYunitzonal,
         prednames = c("dem", "tcc", "tpi", "tnt"),
         predfac = "tnt")
#> INTENSITY not in dataset.. assuming single intensity plots
#> DESIGNCD not in dataset.. assuming DESIGNCD = 1 (annual inventory)
#> For FIA estimation, adjustment factors are calculated to account for plots with partial nonresponse.
#> ...there are 14 nonsampled forest conditions in the dataset.
#> filter removed 14 records: COND_STATUS_CD != 5
#> $module
#> [1] "MA"
#> 
#> $popType
#> [1] "VOL"
#> 
#> $condx
#>               PLT_CN CONDID CONDPROP_UNADJ SUBPPROP_UNADJ MICRPROP_UNADJ
#>    1: 40404728010690      1              1              1              1
#>    2: 40404729010690      1              1              1              1
#>    3: 40404730010690      1              1              1              1
#>    4: 40404731010690      1              1              1              1
#>    5: 40404733010690      1              1              1              1
#>   ---                                                                   
#> 3206: 40407866010690      1              1              1              1
#> 3207: 40407867010690      1              1              1              1
#> 3208: 40407868010690      1              1              1              1
#> 3209: 40407869010690      1              1              1              1
#> 3210: 46792188020004      1              1              1              1
#>       MACRPROP_UNADJ ESTN_UNIT  dem tcc     tpi tnt2 cadjfac ADJ_FACTOR_SUBP
#>    1:             NA         1 2372   0  10.625    1       1               1
#>    2:             NA         1 2382   5   0.750    1       1               1
#>    3:             NA         1 2274  45 -12.125    0       1               1
#>    4:             NA         1 2203   0  -0.125    1       1               1
#>    5:             NA         1 2276   0   1.250    1       1               1
#>   ---                                                                       
#> 3206:             NA        45 1248   2   0.125    1       1               1
#> 3207:             NA        45 1286   0   2.875    1       1               1
#> 3208:             NA        45 1272   0   1.875    1       1               1
#> 3209:             NA        45 1209   0   1.250    1       1               1
#> 3210:             NA        29 2165  13   0.500    1       1               1
#>       ADJ_FACTOR_MACR ADJ_FACTOR_MICR CONDPROP_ADJ
#>    1:               0               1            1
#>    2:               0               1            1
#>    3:               0               1            1
#>    4:               0               1            1
#>    5:               0               1            1
#>   ---                                             
#> 3206:               0               1            1
#> 3207:               0               1            1
#> 3208:               0               1            1
#> 3209:               0               1            1
#> 3210:               0               1            1
#> 
#> $pltcondx
#>               PLT_CN STATECD UNITCD COUNTYCD INVYR PLOT_STATUS_CD MEASYEAR
#>    1: 40404728010690      56      2        1  2013              2     2013
#>    2: 40404729010690      56      2        1  2011              1     2011
#>    3: 40404730010690      56      2        1  2013              1     2013
#>    4: 40404731010690      56      2        1  2012              2     2012
#>    5: 40404733010690      56      2        1  2012              2     2012
#>   ---                                                                     
#> 3206: 40407866010690      56      3       45  2011              2     2011
#> 3207: 40407867010690      56      3       45  2012              2     2012
#> 3208: 40407868010690      56      3       45  2011              2     2011
#> 3209: 40407869010690      56      3       45  2013              2     2013
#> 3210: 46792188020004      56      1       29  2012              1     2012
#>       RDDISTCD CONDID COND_NONSAMPLE_REASN_CD OWNCD OWNGRPCD RESERVCD SITECLCD
#>    1:       NA      1                      NA    46       40        0       NA
#>    2:        1      1                      NA    46       40        0        7
#>    3:        6      1                      NA    11       10        0        6
#>    4:       NA      1                      NA    22       20        0       NA
#>    5:       NA      1                      NA    46       40        0       NA
#>   ---                                                                         
#> 3206:       NA      1                      NA    46       40        0       NA
#> 3207:       NA      1                      NA    46       40        0       NA
#> 3208:       NA      1                      NA    12       10        0       NA
#> 3209:       NA      1                      NA    46       40        0       NA
#> 3210:        8      1                      NA    11       10        1        6
#>       STDORGCD ADFORCD LIVE_CANOPY_CVR_PCT COND_STATUS_CD NF_COND_STATUS_CD
#>    1:       NA      NA                   0              2                NA
#>    2:        0      NA                  17              1                NA
#>    3:        0     206                  41              1                NA
#>    4:       NA      NA                   0              2                NA
#>    5:       NA      NA                   0              2                NA
#>   ---                                                                      
#> 3206:       NA      NA                   0              2                NA
#> 3207:       NA      NA                   0              2                NA
#> 3208:       NA     206                   1              2                NA
#> 3209:       NA      NA                   0              2                NA
#> 3210:        0     214                  48              1                NA
#>       FORTYPCD STDSZCD STDAGE GSSTKCD DSTRBCD1 DSTRBYR1 DSTRBCD2 DSTRBYR2
#>    1:       NA      NA     NA      NA       NA       NA       NA       NA
#>    2:      366       1     46       5        0       NA        0       NA
#>    3:      201       1    220       3        0       NA        0       NA
#>    4:       NA      NA     NA      NA       NA       NA       NA       NA
#>    5:       NA      NA     NA      NA       NA       NA       NA       NA
#>   ---                                                                    
#> 3206:       NA      NA     NA      NA       NA       NA       NA       NA
#> 3207:       NA      NA     NA      NA       NA       NA       NA       NA
#> 3208:       NA      NA     NA      NA       NA       NA       NA       NA
#> 3209:       NA      NA     NA      NA       NA       NA       NA       NA
#> 3210:      201       1    109       3        0       NA        0       NA
#>       FORTYPGRPCD TIMBERCD
#>    1:          NA       NA
#>    2:         360        2
#>    3:         200        1
#>    4:          NA       NA
#>    5:          NA       NA
#>   ---                     
#> 3206:          NA       NA
#> 3207:          NA       NA
#> 3208:          NA       NA
#> 3209:          NA       NA
#> 3210:         200        1
#> 
#> $cuniqueid
#> [1] "PLT_CN"
#> 
#> $condid
#> [1] "CONDID"
#> 
#> $ACI.filter
#> [1] "COND_STATUS_CD == 1"
#> 
#> $unitarea
#>     ESTN_UNIT   ACRES
#>  1:         1 2757613
#>  2:         3 2021729
#>  3:         5 3072988
#>  4:         7 5096959
#>  5:         9 2729653
#>  6:        11 1837124
#>  7:        13 5930088
#>  8:        15 1428579
#>  9:        17 1283969
#> 10:        19 2671802
#> 11:        21 1720074
#> 12:        23 2616954
#> 13:        25 3440445
#> 14:        27 1681849
#> 15:        29 4459826
#> 16:        31 1350969
#> 17:        33 1617318
#> 18:        35 3158807
#> 19:        37 6714319
#> 20:        39 2701941
#> 21:        41 1336034
#> 22:        43 1435352
#> 23:        45 1536038
#>     ESTN_UNIT   ACRES
#> 
#> $areavar
#> [1] "ACRES"
#> 
#> $areaunits
#> [1] "acres"
#> 
#> $unitvar
#> [1] "ESTN_UNIT"
#> 
#> $unitvars
#> [1] "ESTN_UNIT"
#> 
#> $unitlut
#>     ESTN_UNIT STATECD COUNTYCD      dem        tcc           tpi      tnt2
#>  1:         1      56        1 2272.926  6.8530714  1.609176e-03 0.8264999
#>  2:         3      56        3 1647.743  7.9022732 -3.102019e-04 0.8487313
#>  3:         5      56        5 1367.107  2.4578633  6.003826e-04 0.9712791
#>  4:         7      56        7 2223.276  7.5236266  2.878460e-04 0.8371048
#>  5:         9      56        9 1653.929  3.4596989 -8.139182e-04 0.9143781
#>  6:        11      56       11 1300.595 13.3583927 -5.464502e-04 0.7278258
#>  7:        13      56       13 2143.260  6.3990155 -1.475728e-03 0.8390603
#>  8:        15      56       15 1413.315  1.3503086  2.232418e-04 0.9810094
#>  9:        17      56       17 1873.567  4.1191205  2.687428e-03 0.8347314
#> 10:        19      56       19 1695.213  9.4401841  8.285926e-04 0.8252693
#> 11:        21      56       21 1825.512  1.0998002 -2.754466e-04 0.9865623
#> 12:        23      56       23 2255.494 13.0094837 -4.589611e-04 0.7331014
#> 13:        25      56       25 1852.164  2.0670811  1.118535e-03 0.9522421
#> 14:        27      56       27 1380.878  0.9419578  5.522725e-04 0.9530363
#> 15:        29      56       29 2291.932 16.5713373  1.204469e-04 0.5766464
#> 16:        31      56       31 1572.269  3.3209321 -6.538782e-04 0.9248072
#> 17:        33      56       33 1570.581 14.7374346  3.234996e-04 0.7161021
#> 18:        35      56       35 2446.198 10.6072114  4.068747e-03 0.7608623
#> 19:        37      56       37 2091.513  0.8143151  3.665207e-05 0.9848022
#> 20:        39      56       39 2453.499 29.5642925 -5.082770e-04 0.3635238
#> 21:        41      56       41 2209.581  5.0478339 -1.207306e-03 0.8907651
#> 22:        43      56       43 1595.071  5.1797763 -2.165427e-03 0.8993017
#> 23:        45      56       45 1358.073  4.2119798 -1.588204e-03 0.8877382
#>     ESTN_UNIT STATECD COUNTYCD      dem        tcc           tpi      tnt2
#>     n.total
#>  1:     133
#>  2:      98
#>  3:     152
#>  4:     245
#>  5:     133
#>  6:      85
#>  7:     290
#>  8:      70
#>  9:      58
#> 10:     128
#> 11:      86
#> 12:     132
#> 13:     175
#> 14:      79
#> 15:     216
#> 16:      64
#> 17:      82
#> 18:     158
#> 19:     339
#> 20:     125
#> 21:      63
#> 22:      63
#> 23:      73
#>     n.total
#> 
#> $plotsampcnt
#>                                                            PLOT_STATUS_NM
#> 1 Sampled - at least one accessible forest land condition present on plot
#> 2           Sampled - no accessible forest land condition present on plot
#>   PLOT_STATUS_CD NBRPLOT
#> 1              1     556
#> 2              2    2491
#> 
#> $condsampcnt
#>    COND_STATUS_NM COND_STATUS_CD NBRCOND
#> 1     Forest land              1     590
#> 2  Nonforest land              2    2590
#> 3 Noncensus water              3      10
#> 4    Census water              4      20
#> 5      Nonsampled              5      14
#> 
#> $npixels
#>     ESTN_UNIT npixels
#>  1:         1 1376714
#>  2:         3 1010229
#>  3:         5 1538394
#>  4:         7 2546066
#>  5:         9 1362852
#>  6:        11  915454
#>  7:        13 2961420
#>  8:        15  713352
#>  9:        17  641459
#> 10:        19 1334190
#> 11:        21  859967
#> 12:        23 1308662
#> 13:        25 1720554
#> 14:        27  841523
#> 15:        29 2228161
#> 16:        31  675011
#> 17:        33  807188
#> 18:        35 1577267
#> 19:        37 3355881
#> 20:        39 1349166
#> 21:        41  668120
#> 22:        43  717122
#> 23:        45  767376
#>     ESTN_UNIT npixels
#> 
#> $npixelvar
#> [1] "npixels"
#> 
#> $states
#> [1] "Wyoming"
#> 
#> $invyrs
#> $invyrs$Wyoming
#> [1] 2011 2012 2013
#> 
#> 
#> $estvar.area
#> [1] "CONDPROP_ADJ"
#> 
#> $adj
#> [1] "plot"
#> 
#> $treex
#>                PLT_CN CONDID SUBP TREE STATUSCD SPCD SPGRPCD  DIA HT TREECLCD
#>     1: 40404729010690      1    1    2        1   66      23 10.8 14        3
#>     2: 40404729010690      1    4    3        1   66      23 11.6 19        3
#>     3: 40404729010690      1    1    1        2  113      24  7.7 18        3
#>     4: 40404729010690      1    1    3        2  113      24  5.2 23        3
#>     5: 40404729010690      1    1    4        1  113      24  5.2 18        2
#>    ---                                                                       
#> 18376: 46792188020004      1    4   13        1  202      10  7.0 26        2
#> 18377: 46792188020004      1    4   14        2  202      10 11.4 53        3
#> 18378: 46792188020004      1    4   15        2  202      10 10.6 46        3
#> 18379: 46792188020004      1    4   16        2  202      10  6.3 41        3
#> 18380: 46792188020004      1    4   17        1  202      10  1.9  8        3
#>        AGENTCD STANDING_DEAD_CD  VOLCFNET  VOLCFGRS VOLBFNET TPA_UNADJ
#>     1:      NA               NA  3.411463  3.411463       NA  6.018046
#>     2:      NA               NA  5.623683  5.797611       NA  6.018046
#>     3:      10                1  1.067166  1.940302       NA  6.018046
#>     4:      10                1  0.381894  0.694352       NA  6.018046
#>     5:      NA               NA  0.316063  0.316063       NA  6.018046
#>    ---                                                                
#> 18376:      NA               NA  2.125580  2.125580       NA  6.018046
#> 18377:      NA                1 15.149782 15.149782       NA  6.018046
#> 18378:      NA                1 11.160959 11.160959       NA  6.018046
#> 18379:      NA                1  2.945213  2.945213       NA  6.018046
#> 18380:      NA               NA        NA        NA       NA 74.965282
#>         DRYBIO_AG  CARBON_AG         BA TPROP_BASIS tadjfac
#>     1:  94.516629  47.258315 0.63615456        SUBP       1
#>     2: 155.807512  77.903756 0.73389024        SUBP       1
#>     3:  30.761698  15.380849 0.32336766        SUBP       1
#>     4:  11.305782   5.652891 0.14747616        SUBP       1
#>     5:  11.210763   5.605382 0.14747616        SUBP       1
#>    ---                                                     
#> 18376:  88.388202  44.194101 0.26724600        SUBP       1
#> 18377: 305.250275 152.625138 0.70880184        SUBP       1
#> 18378: 225.732139 112.866070 0.61281144        SUBP       1
#> 18379:  61.586094  30.793047 0.21646926        SUBP       1
#> 18380:   5.065642   2.532821 0.01968894        MICR       1
#> 
#> $tuniqueid
#> [1] "PLT_CN"
#> 
#> $adjtree
#> [1] FALSE
#> 
#> $seedx
#>               PLT_CN SUBP CONDID SPCD SPGRPCD  TPA_UNADJ TREECOUNT
#>    1: 40404729010690    2      1  113      24   74.96528         1
#>    2: 40404730010690    2      1  202      10  224.89585         3
#>    3: 40404738010690    2      1  746      44 2323.92376        31
#>    4: 40404738010690    4      1   19      12   74.96528         1
#>    5: 40404738010690    4      1  113      24   74.96528         1
#>   ---                                                             
#> 1603: 40407815010690    1      1  313      47  224.89585         3
#> 1604: 40407831010690    1      1  122      11 4497.91695        60
#> 1605: 46792188020004    2      1  202      10  374.82641         5
#> 1606: 46792188020004    3      1  202      10  299.86113         4
#> 1607: 46792188020004    4      1  202      10  224.89585         3
#>       TREECOUNT_CALC SEEDCNT6 SEEDSUBP6 tadjfac
#>    1:              1        1         0       1
#>    2:              3        3         0       1
#>    3:             31        6         1       1
#>    4:              1        1         0       1
#>    5:              1        1         0       1
#>   ---                                          
#> 1603:              3        3         0       2
#> 1604:             60        6         1       1
#> 1605:              5        5         0       1
#> 1606:              4        4         0       1
#> 1607:              3        3         0       1
#> 
#> $prednames
#> [1] "dem"  "tcc"  "tpi"  "tnt2"
#> 
#> $predfac
#> [1] "tnt"
#> 
# }