1 |
x |
|
tr |
|
alpha |
|
null.value |
|
pr |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (x, tr = 0.2, alpha = 0.05, null.value = 0, pr = TRUE)
{
if (pr) {
print("The p-value returned by the this function is based on the")
print("null value specified by the argument null.value, which defaults to 0")
}
x <- elimna(x)
se <- winse(x, tr = tr)
df <- length(x) - 2 * floor(tr * length(x)) - 1
trimci <- winmean(x, tr) - qt(1 - alpha/2, df) * se
trimci[2] <- winmean(x, tr) + qt(1 - alpha/2, df) * se
test <- (winmean(x, tr) - null.value)/se
sig <- 2 * (1 - pt(abs(test), df))
list(ci = trimci, test.stat = test, p.value = sig)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.