impute {rconifers}R Documentation

Imputes missing values using the CONIFERS imputation functions

Description

Imputes missing values for a CONIFERS sample.data object.

Usage

impute( x, control=list(fpr=11.78, min.dbh=5.6, baf=40.0) )

Arguments

x a CONIFERS sample.data object
control a list object that controls how missing expansion factors are calculated (See details)

Details

The impute function returns a list object of class sample.data that contains all the required data elements needed to call most CONIFERS functions. The control argument needs to contain at least the following elements:

fpr
is the radius, in feet, for a fixed area plot which is used to sample all stems with a breast height diameter (DBH) that is less than min min.dbh argument.
min.dbh
is the minimum value, in inches, for stems to be sampled on a fixed area plot.
baf
is the constant, in $ft^2/acre$ that defines the maximum distance for which stems with a diameter at breast height over the min.dbh

Value

impute returns a sample.data object with no missing values that can then be used in any rconifers function.

Author(s)

Jeff D. Hamann jeff.hamann@forestinformatics.com,
Martin W. Ritchie mritchie@fs.fed.us

References

Ritchie, M.W. 2008. User's Guide and Help System for CONIFERS: A Simulator for Young Conifer Plantations Version 4.10. See http://www.fs.fed.us/psw/programs/ecology_of_western_forests/projects/conifers/

See Also

calc.max.sdi, impute, project, rand.seed, rconifers, sample.data, set.species.map, set.variant, smc, summary.sample.data, swo, thin

Examples

library( rconifers )

## set the variant to the SWO variant and set species map
set.species.map( set.variant(0) )

## grow the data that was originally swo in the smc variant
# load and display CONIFERS example plots
data( plots.swo )
print( plots.swo )

# load and display CONIFERS example plants
data( plants.swo )
print( plants.swo )

# view the current crown widths for first 7 obs
plants.swo[1:7,]
# remove crown.width observations from plants 3 to 6 to test
# the impute function

blanks <- c(3:6)
plants.swo[blanks,]$crown.width <- NA
plants.swo[1:7,]

# create the sample.data list object
sample.swo.3 <- list( plots=plots.swo, plants=plants.swo, age=3, x0=0.0 )
class(sample.swo.3)  <- "sample.data"

# fill in missing values
sample.swo.3.imp <- impute( sample.swo.3 )

# view imputed values
sample.swo.3.imp$plants[1:7,]


[Package rconifers version 1.0.0 Index]