interlabstats: Statistics for interlaboratory studies

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

View source: R/interlab.R

Description

Calculates statistics for interlaboratory studies. interlabstats is a generic function.

interlabstats.formula generates the statistics based on a simple analysis of variance.

interlabstats.default uses a suitable fitted model object, currently either an lmeMod or a rlmeMod object, and extracts the desired statistics from it.

Usage

1
2
3
4
5
6
7
interlabstats(object, ...)
## Default S3 method:
interlabstats(object)
## S3 method for class 'formula'
{formula, data, subset}
## S3 method for class 'interlab'
interlabstatsprint(x, groups=TRUE, ...)

Arguments

object

for interlabstats.default: object of class lmerMod or rlmerMod, obtained from function lmer of package lme4 or rlmer of package robustlmm, respectively.

formula

Formula of type y ~ group , where y is the measurement and group is the laboraotory factor

data

dataset containing the variables used in formula

subset

usual subset argument, passed to model.frame

x

object of class interlab to be printed

groups

for print.interlab: should statistics for groups be printed (if available)?

...

further arguments to be passed to the methods or to print.default

Details

By interlab.formula, the estimated quantities are obtained from a classical fixed effects Analysis of Variance.

Value

A list containig

mean

overall mean

sigma

within-group standard deviation

siggroup

between-group standard deviation

repeatability

standard error of a difference between measurements of the same lab

reproducibility

same, for different labs

groups

table, containing number of observations, mean and standard deviation for each group

data

the two relevant variables of the original data.frame

call

the call to the function

method

estimatrion method. "classical" for interlabstats.formula, class(object) otherwise.

Argumentx of print.interlab:

x

interlab object, as generated by interlabstats

groups

Should group table be printed?

...

Further arguments passed to format

Author(s)

Werner A. Stahel, ETH Zurich

References

Stahel ...

See Also

plot.interlab, lmer, rlmer

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
data(d.perm)
dd <- d.perm[d.perm$section=="w.1",]
dd[dd$team=="A","perm.log"] <- dd[dd$team=="A","perm.log"] - 0.3
  ## otherwise, there is no between group variation
( r.cl <- interlabstats(perm.log~team, data=dd) )
print(r.cl, groups=FALSE)

## Mixed models: lme
require(lme4)
r.lme <- lmer(perm.log~(1|team), data=dd, na.action=na.omit)
summary(r.lme)
interlabstats(r.lme)

## robust
require(robustlmm)
r.rlme <- rlmer(perm.log~(1|team), data=dd, na.action=na.omit)
summary(r.rlme)
interlabstats(r.rlme)

qmrobust documentation built on May 2, 2019, 6:50 p.m.