Description Usage Arguments Details Value Author(s) References See Also Examples
Add variable/s to the population file which are good predictors of the variables/s of interest
1 |
popfile |
dataframe containing population data - as a minimum there must be columns named 'PID' (plot identifier), 'Strata' and 'plot_type'. |
training |
dataframe containing training data. Must contain auxiliary variables and variable/s of interest. |
yvars |
vector containing the name of each variable of interest (dependent variable). |
xvars |
vector containing the names of the auxiliary variables. |
pool |
logical value - should the training data be pooled across strata prior to fitting the regression model? |
The predictor variable for the each variable of interest (dependent variable) is obtained by performing random forest regression on the training data using the designated auxiliary variables. The training data can be pooled across strata (pool=T), or fitted separately within each strata (the default). Not normally called directly.
A list with components:-
popfile |
population file - data frame, as above, with predictor variable/s added to the file |
r.sqared |
dataframe containing the R-squared values obtained from the random forest regression/s |
G. Melville
Random forest regression is performed using the randomForest package.
1 | ## Addz(popfile, training, yvars, xvars)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.