Description Usage Arguments Details Value Author(s) References See Also Examples

Parametric replacement of values above upper detection limit for compositional data using classical and robust methods (possibly also the pls method) based on ilr-transformations with special choice of balances.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |

`x` |
data.frame or matrix |

`maxit` |
maximum number of iterations |

`eps` |
convergency criteria |

`method` |
either "lm", "lmrob" or "pls" |

`dl` |
Detection limit for each variable. zero for variables with variables that have no detection limit problems. |

`variation, ` |
if TRUE those predictors are chosen in each step, who's variation is lowest to the predictor. |

`nPred, ` |
if determined and variation equals TRUE, it fixes the number of predictors |

`nComp` |
if determined, it fixes the number of pls components. If “boot”, the number of pls components are estimated using a bootstraped cross validation approach. |

`bruteforce` |
sets imputed values above the detection limit to the detection limit. Replacement above the detection limit are only exeptionally occur due to numerical instabilities. The default is FALSE! |

`noisemethod` |
adding noise to imputed values. Experimental |

`noise` |
TRUE to activate noise (experimental) |

`R` |
number of bootstrap samples for the determination of pls components. Only important for method “pls”. |

`correction` |
normal or density |

`verbose` |
additional print output during calculations. |

imputeUDLs

An imputation method for right-censored compositional data. Statistical analysis is not possible with values reported in data, for example as ">10000". These values are replaced using tobit regression.

The algorithm iteratively imputes parts with values above upper detection limit whereas in each step (1) compositional data are expressed in pivot coordinates (2) tobit regression is applied (3) the values above upper detection limit are replaced by the expected values (4) the corresponding inverse ilr mapping is applied. After all parts are imputed, the algorithm starts again until the imputations only change marginally.

`x ` |
imputed data |

`criteria ` |
change between last and second last iteration |

`iter ` |
number of iterations |

```
maxit
``` |
maximum number of iterations |

`wind` |
index of values above upper detection limit |

`nComp` |
number of components for method pls |

`method` |
chosen method |

Peter Filzmoser, Dominika Miksova based on function imputeBDLs code from Matthias Templ

Martin-Fernandez, J.A., Hron K., Templ, M., Filzmoser, P. and Palarea-Albaladejo, J. (2012).
Model-based replacement of rounded zeros in compositional data: Classical and robust approaches.
*Computational Statistics and Data Analysis*, 56, 2688-2704.

Templ, M. and Hron, K. and Filzmoser and Gardlo, A. (2016).
Imputation of rounded zeros for high-dimensional compositional data.
*Chemometrics and Intelligent Laboratory Systems*, 155, 183-190.

1 2 3 4 5 6 7 8 9 10 11 | ```
data(gemas) # read data
dat <- gemas[gemas$COUNTRY=="HEL",c(12:29)]
UDL <- apply(dat,2,max)
names(UDL) <- names(dat)
UDL["Mn"] <- quantile(dat[,"Mn"], probs = 0.8) # UDL present only in one variable
whichudl <- dat[,"Mn"] > UDL["Mn"]
# classical method
imp.lm <- dat
imp.lm[whichudl,"Mn"] <- Inf
res.lm <- imputeUDLs(imp.lm, dl=UDL, method="lm", variation=TRUE)
imp.lm <- res.lm$x
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.