Skip to content
Prev 261453 / 398502 Next

Odp: Three sigma rule

Hi

r-help-bounces at r-project.org napsal dne 28.05.2011 20:12:33:
in
rule?
percentile
Not sure what you exactly want but you could look at function quantile.

Or you could compute confidence interval for mean by e.g.
function (x, p = 0.95) 
{
    x.na <- na.omit(x)
    mu <- mean(x.na)
    odch <- sd(x.na)
    l <- length(x.na)
    alfa <- (1 - p)/2
    mu.d <- mu - qt(1 - alfa, l - 1) * odch/sqrt(l)
    mu.h <- mu + qt(1 - alfa, l - 1) * odch/sqrt(l)
    return(data.frame(mu.d, mu, mu.h))
}

Regards
Petr
http://www.R-project.org/posting-guide.html