weightedmean(x, ...)
"weightedmean"(x, detect.outliers = TRUE, plot = TRUE, rect.col = rgb(0, 1, 0, 0.5), outlier.col = rgb(0, 1, 1, 0.5), sigdig = 2, alpha = 0.05, ...)
"weightedmean"(x, detect.outliers = TRUE, plot = TRUE, rect.col = rgb(0, 1, 0, 0.5), outlier.col = rgb(0, 1, 1, 0.5), sigdig = 2, type = 4, cutoff.76 = 1100, cutoff.disc = c(-15, 5), alpha = 0.05, dcu = TRUE, ...)
"weightedmean"(x, detect.outliers = TRUE, plot = TRUE, rect.col = rgb(0, 1, 0, 0.5), outlier.col = rgb(0, 1, 1, 0.5), sigdig = 2, alpha = 0.05, dcu = TRUE, ...)UPb OR an object of class ArArdetect.outliers=TRUE, the outliers are
given a different colour.type=4.cutoff.disc=NA if you do not want to use this filter.PLOT=FALSE, returns a list with the follwing items:mean: a two element vector with the weighted mean and its
standard error.disp: a two element vector with the (over)dispersion and its
standard error.mswd: the Mean Square of the Weighted Deviates
(a.k.a. `reduced Chi-square' statistic)p.value: the p-value of a Chi-square test with n-1 degrees
of freedom, testing the null hypothesis that the underlying
population is not overdispersed.valid: vector of Boolean flags indicating which steps are
included into the weighted mean calculation
ages <- c(251.9,251.59,251.47,251.35,251.1,251.04,250.79,250.73,251.22,228.43)
errs <- c(0.28,0.28,0.63,0.34,0.28,0.63,0.28,0.4,0.28,0.33)
weightedmean(cbind(ages,errs))
#data(examples)
#weightedmean(examples$ArAr)
Run the code above in your browser using DataLab