naMeanSubst {MorphoTools2} | R Documentation |
Replace Missing Data by Population Average
Description
This function substitutes missing data using the average value of the respective character in the respective population.
Usage
naMeanSubst(object)
Arguments
object |
an object of class |
Details
Generally, most of the multivariate analyses require a full data matrix. The preferred approach is to reduce the data set to complete observations only (i.e., perform the casewise deletion of missing data) or to remove characters for which there are missing values. The use of mean substitution, which introduces values that are not present in the original data, is justified only if (1) there are relatively few missing values, (2) these missing values are scattered throughout many characters (each character includes only a few missing values) and (3) removing all individuals or all characters with missing data would unacceptably reduce the data set.
Value
an object of class morphodata
with the following elements:
ID |
IDs of each row of |
Population |
population membership of each row of |
Taxon |
taxon membership of each row of |
data |
|
Examples
data(centaurea)
centaurea = naMeanSubst(centaurea)