romr.fnc: Exclude outliers.

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

View source: R/romr.fnc.R

Description

Exclude outliers with a standardized residual at a distance greater than 2.5 standard deviations from 0. Note that this function cannot be used with generalized linear mixed-effects models (glmers).

Usage

1
romr.fnc(model, data, trim = 2.5)

Arguments

model

A mer object (fitted by function lmer). Note that this function cannot be used with generalized linear mixed-effects models (glmers).

data

The data frame on which the mer object was fitted.

trim

Threshold at which residuals will be removed. Defaults to 2.5 (standard deviations above and below the residuals mean).

Value

The function returns the following objects:

data

The data with outliers removed.

data0

The original data prior to removing the outliers.

n.removed

The number of data points removed.

percent.removed

The percentage of removed data points.

Author(s)

Antoine Tremblay, Statistics Canada, trea26@gmail.com, with contrbutions from Andy Flies, Michigan State University.

References

Baayen, R.H. (2008). Analyzing Linguistic Data. A Practical Introduction to Statistics Using R. Cambridge, UK: Cambridge University Press.

Newman, A.J., Tremblay, A., Nichols, E.S., Neville, H.J., and Ullman, M.T. (submitted). The Influence of Language Proficiency on Lexical-Semantic Processing in Native and Late Learners of English: ERP evidence. Submitted to the Journal of Cognitive Neuroscience.

Tremblay, A. and Tucker B. V. (submitted). What can the production of four-word sequences tell us about the mental lexicon? Submitted to The Mental Lexicon.

See Also

mcp.fnc perSubjectTrim.fnc

Examples

1
# see example in LMERConvenienceFunctions help page.

Example output

Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 

LMERConvenienceFunctions documentation built on Oct. 23, 2020, 5:12 p.m.