lmeWinsor(fixed, data, random, lower=NULL, upper=NULL, trim=0,
quantileType=7, correlation, weights, subset, method,
na.action, control, contrasts = NULL, keep.data=TRUE,
...)
NOTES:
(1) trim>0 with a singular fit may give an error. In such cases, fix the singu
NOTE: Other control parameters such as 'singular.o
1.1. mdly <- mdlx <- fixed; mdly[[3]] <- NULL; mdlx[[2]] <- NULL;
1.2. xNames <- c(all.vars(mdlx), all.vars(random)).
1.3. yNames <- all.vars(mdly). Give an error if as.character(mdly[[2]]) != yNames.
2. Do 'lower' and 'upper' contain limits for all numeric columns of 'data? Create limits to fill any missing.
3. clipData = data with all xNames clipped to (lower, upper).
4. fit0 <- lme(...)
5. Add components lower and upper to fit0 and convert it to class c('lmeWinsor', 'lme').
6. Clip any stored predictions at the Winsor limits for 'y'.
NOTE: This is different from lmWinsor, which uses quadratic programming with predictions outside limits, transferring extreme points one at a time to constraints that force the unWinsorized predictions for those points to be at least as extreme as the limits.
lmWinsor
predict.lmeWinsor
lme
quantile
fm1w <- lmeWinsor(distance ~ age, data = Orthodont,
random=~age|Subject)
fm1w.1 <- lmeWinsor(distance ~ age, data = Orthodont,
random=~age|Subject, trim=0.1)
Run the code above in your browser using DataLab