Forum: Missing values in cca and rda: please test
Content:Functions cca() and rda() can handle missing data in constraints or conditions (external variables) in current R-Forge version of vegan (1.16-27 and later). The functions have new argument na.action. The default is na.fail which stops the analysis if there were missing values in external variables. Other alternatives na.omit and na.exclude remove all variables with missing data in used external variables (constraints, conditions). With option na.exclude, the results for sites are padded to the same number of rows as the original data: the LC scores will be NA, but WA scores for sites are estimated even for rows with missing constraints in non-partial models. The LC scores are linear combinations of constraints and they are missing for missing data. The WA scores depend on community data, and they can be estimated even for missing constraints. In partial models with term Condition() the effect of conditions is removed from the community data, and these cannot be estimated with missing data, and therefore WA scores are not available for these.
The change was made so that the old internal structures in the cca or rda result objects were unchanged, except that the rows with missing data were removed. Therefore functions handling directly cca objects should work normally even with na.actions na.exclude or na.omit. Functions using scores() interface will be influenced by the na.action: with na.omit, the number of rows for site data does not match the original data, with na.exclude it has the same dimensions but may contain NA values.
At the moment there are no open issues, and the functions are ready for testing. Please try these functions, and report problems to the vegan forums in R-Forge or directly to Jari Oksanen at Oulu.fi.
Happy testing! Jari Oksanen
Jari Oksanen - 2014-09-18 15:58 -
Jari Oksanen - 2014-09-18 15:57 -
|Topic||Topic Starter||Replies||Last Post|
|not intended to be in the R-Forge main page||Jari Oksanen||0||2009-09-09 17:39|
|open issues: step and anova(..., by = "term")||Jari Oksanen||0||2009-09-08 07:54|