impute.FIA,proFIAset-method {proFIA} | R Documentation

## Fill missing values using the provided method.

### Description

Impute the missing values in an FIA experiment using a Weighted K-Nearest Neighbours on Truncated Distribution implemented in `impute.KNN_TN` or by random forest using the `impute.randomForest` function.

### Usage

    ## S4 method for signature 'proFIAset'
    impute.FIA(object, method = c("KNN_TN", "randomForest"), ...)

### Arguments

`object` | A proFIAset object.
`method` | The method to be used for missing value imputation.
`...` | Arguments furnished to the imputation method. No argument is required for `impute.randomForest` and the number of neighbours should be furnished using the `impute.KNN_TN` function.

### Examples

    if(require(plasFIA)){
        data(plasSet)

        ###Reinitializing the data matrix an using KNN
        plasSet<-makeDataMatrix(plasSet,maxo=FALSE)
        plasSet<-impute.FIA(plasSet,method="KNN_TN",k=2)

        ###Reinitializing the data matrix and using randomForest
        plasSet<-makeDataMatrix(plasSet,maxo=FALSE)
        plasSet<-impute.FIA(plasSet,method="randomForest")
    }

[Package proFIA version 1.18.0 Index]