dsl: derSimonian-Laird estimator

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

Description

Calculates derSimonian-Laird estimate of location, with standard error, assuming a random-effects model

Usage

1
2
3
4
	dsl(x, ..., na.rm = FALSE)

	## Default S3 method:
dsl(x, s, n = NULL, groups = NULL, ..., na.rm = FALSE)

Arguments

x

numeric vector of mean values for groups, or (if groups is given) of individual observations

s

numeric vector of length length(x) of standard deviations or standard uncertainties associated with the values x.

n

integer giving the number of observations in each group. May be a vector of length length(x). If n is NULL, s is interpreted as a vector of standard uncertainties or standard errors. n is recycled to length(x)

groups

factor, or vetor which can be coerced to factor, of groups. If present, x is interpreted as a vector of individual observations and s and n ignored, if present, with a warning.

na.rm

logical: if TRUE, NA values are removed before processing.

...

Further parameters passed to other methods.

Details

dsl implements the derSimonian-Laird random-effects estimate of location, using the implementation described by Jackson (2010).

The estimator assumes a model of the form

x[i]=mu+b[i]+e[i]

in which b[i] is drawn from N(0, tau^2) and e[i] is drawn from N(0, sigma[i]^2).

The estimator forms a direct calculation of tau, and uses this to form revised estimates of standard error sqrt(s[i]^2+tau^2) in x, calculates weights as the inverse of these and in turn calculates a weighted mean, allowing for any calculated excess variance tau^2.

This implementation permits input in the form of:

Value

A loc.est object; see loc.est for details. In the returned object, individual values xi are always input means (calculated from groups and n as necessary); method.details is returned as a list containing:

mu

The estimated location.

s

The standard error in the location.

tau

The excess variance (as a standard deviation).

Author(s)

S L R Ellison s.ellison@lgc.co.uk

References

Jackson et al. (2010) J Stat Plan Inf 140, 961-970

See Also

loc.est-class

Examples

1
2
3
4
5
6
  #PCB measurements in a sediment from Key Comparison CCQM-K25
  #s are reported standard uncertainties
  pcb105 <- data.frame(x=c(10.21, 10.9, 10.94, 10.58, 10.81, 9.62, 10.8),
               s=c(0.381, 0.250, 0.130, 0.410, 0.445, 0.196, 0.093))
               		
  with( pcb105, dsl(x, s) )

metRology documentation built on May 2, 2019, 12:20 p.m.