Data imputation for longitudinal data
This function fills any missing entries (NA
,
Inf
, null
) in a matrix or dataframe, according to
a specified method. By default, '0'
is considered a value.
data_imputation(traj, id_field = FALSE, method = 2, replace_with = 1, fill_zeros = FALSE, verbose=TRUE)
traj |
[ |
id_field |
[numeric or character] Whether the first column
of the |
method |
[an integer] indicating a method for calculating
the missing values. Options are: |
replace_with |
[an integer from 1 to 6] indicating the technique,
based on a specified |
fill_zeros |
[TRUE or FALSE] whether to consider zeros |
verbose |
to suppress printing output messages (to the console).
Default: |
Given a matrix or data.frame with some missing values
indicated by (NA
, Inf
, null
), this function
impute the missing value by using either an estimation from the
corresponding rows or columns, or to use a regression method to
estimate the missing values.
A data.frame with missing values (NA
, Inf
,
null
) imputed according to the a specified technique.
# Using the example 'traj' datasets imp_data <- data_imputation(traj, id_field = TRUE, method = 2, replace_with = 1, fill_zeros = FALSE, verbose=FALSE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.