t2waypb <-
function(J, K, x, est=tmean,JK = J*K,
alpha = 0.05, grp =c(1:JK), nboot = 2000, bhop=FALSE,SEED = TRUE,...)
{
#
# BETWEEN-BY-BETWEEN DESIGN
#
# A percentile bootstrap for multiple comparisons
# for all main effects and interactions
# The analysis is done by generating bootstrap samples and
# using an appropriate linear contrast.
#
# The R variable x is assumed to contain the raw
# data stored in list mode or in a matrix.
# If in list mode, x[[1]] contains the data
# for the first level of both factors: level 1,1.
# x[[2]] is assumed to contain the data for level 1 of the
# first factor and level 2 of the second: level 1,2
# x[[K]] is the data for level 1,K
# x[[K+1]] is the data for level 2,1, x[[2K]] is level 2,K, etc.
#
# If the data are in a matrix, column 1 is assumed to
# correspond to x[[1]], column 2 to x[[2]], etc.
#
# When in list mode x is assumed to have length JK, the total number
# groups being tested, but a subset of the data can be analyzed
# using grp
#
con=con2way(J,K)
A=bbmcppb.sub(J=J, K=K, x, est=est,con=con$conA,
alpha = alpha, nboot = nboot, bhop=bhop,SEED = SEED,grp=grp,...)
B=bbmcppb.sub(J=J, K=K, x, est=est,con=con$conB,
alpha = alpha, nboot = nboot, bhop=bhop,SEED = SEED,grp=grp,...)
AB=bbmcppb.sub(J=J, K=K, x, est=est,con=con$conAB,
alpha = alpha, nboot = nboot, bhop=bhop,SEED = SEED,grp=grp,...)
list(Fac.A=A,Fac.B=B,Fac.AB=AB)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.