# NOT RUN {
s0 <- spotSeverity(xbar=0.4, mu0=0.0, mu1=0.6, n=25, sigma=1, alpha=0.03)
print(s0)
s1 <- spotSeverity(xbar=0.4, mu0=0.6, mu1=0.6, n=25, sigma=1, alpha=0.03)
print(s1)
s2 <- spotSeverity(xbar=0, mu0=0.6, mu1=0.6, n=25, sigma=1, alpha=0.03)
print(s2)
## Example from Mayo, p345
spotSeverity(xbar=90, mu0=0, mu1= 200, n=200, sigma = 450, alpha = 0.025,
paired = FALSE, tdist = FALSE)
## Example from Vena02a to compare with results from t.test()
## library("BHH2")
## data(shoes.data)
## A <- shoes.data$matA
## B <- shoes.data$matB
A <- c(13.2, 8.2, 10.9, 14.3, 10.7, 6.6, 9.5, 10.8, 8.8, 13.3)
B <- c(14, 8.8, 11.2, 14.2, 11.8, 6.4, 9.8, 11.3, 9.3, 13.6)
t.paired <- t.test(x = A, y = B, var.equal = TRUE, paired = TRUE,
alternative = "greater", conf.level = 0.95)
xbar <- mean(A-B)
n <- length(A)
sigma <- sd(A-B)
s.paired <- spotSeverity(xbar=xbar,mu0=0, mu1= 1, n=n, sigma = sigma,
alpha = 0.025, tdist = TRUE)
# }
Run the code above in your browser using DataLab