Description Usage Arguments Value References Examples
Given an one-way random-effects ANOVA model, Y_{ij}=μ+u_i+ε_{ij} with u_i\sim N(0,σ_b^2), ε_{ij}\sim N(0,σ_w^2), we want to make inference on the total absolute variation parameter, ρ^2=μ^2+σ_b^2+σ_w^2. A generalized inference method is taken to conduct significance test and calculate CI for ρ.
1 |
ng |
sample sizes for each factor level |
mus |
sample mean values at each factor level |
sse |
total error sum of squares (sum of within-group sample variances) |
alpha |
desired CI coefficient |
rho0 |
the null threshold value to test H_0: ρ≥ ρ_0. |
Bmc |
number of Monte Carlo simulations to approximate the distribution of generalized test statistics |
generalized test p-value
computed CI for ρ
simulated generalized test statistics
Tsui,K.-W. and Weerahandi,S. (1989). Generalized p-Values in Significance Testing of Hypotheses in the Presence of Nuisance Parameters. Journal of the American Statistical Association 84, 602–607.
Weerahandi,S. (1993). Generalized Confidence Intervals. Journal of the American Statistical Association 88, 899–905.
Bai,Y., Wang,Z., Lystig,T., and Wu,B. (2019) Efficient and powerful equivalency test on combined mean and variance with application to diagnostic device comparison studies. arXiv:1908.07979
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Simulation example: how to get summary stats from data
A = rep(1:10, 5:14)
Y = 0.5+rnorm(length(A))+rnorm(length(unique(A)))[A]
ng = as.vector(table(A))
sse = sum(tapply(Y, A, var)*(ng-1), na.rm=TRUE)
mus = tapply(Y, A, mean)
ans = GTrms(ng,mus,sse, alpha=0.05,rho0=2.5); ans[1:2]
## Z-test
Zrms(ng,mus,sse, alpha=0.05,rho0=2.5)
## PO comparison study
ng = c(9, 10, 10, 10, 5, 10, 10, 10, 10, 10, 10, 10, 2, 10, 10, 10)
mus = c(-0.026,0.447,0.083,-0.103,-2.587,-0.61,0.04,-0.593, 0.963,0.643,-0.2,-1.337,-4.333,-2.807,0.563,-0.797)
sse = 221.037
set.seed(123)
ans = GTrms(ng,mus,sse, alpha=0.1, rho0=3, Bmc=1e4); ans[1:2]
## Z-test
Zrms(ng,mus,sse, alpha=0.1,rho0=3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.