Description Usage Arguments Details Value Author(s) References Examples
Main function of the package, interface for every analysis. The dataset can be balanced or not for almost all possible choices of the input parameters. The function allows also for the presence of one or more continuous covariates or for stratified analysis.
1 2 3 4 5 |
Y |
input |
covars |
it can be a |
data |
optional |
analysisType |
|
p.adj.method |
|
p.valuesType |
|
testStatistic |
|
combFunct |
See the references for more details about their properties. |
univ.p.values |
|
tails |
|
linearInter |
|
returnPermSpace |
|
nPerms |
|
alpha |
|
seed |
|
iteratedNPC |
|
... |
put here the optional |
Depending on the chosen p-values type and on the analysis type, only some options can be selected:
with "simple"
or "regres"
analysis
and "asymptotic"
p-values,
"Hotelling"
and "Ttest"
; with
permutation
p-values "AD"
,
"Hotelling"
and "meanDiff"
can be
selected.
With "strata"
analysis and
"asymptotic"
p-values, "lmCoef"
and
"Ttest"
; with "permutation"
p-values
"AD"
and "meanDiff"
can be selected.
an object of class SoupObject
.
Federico Mattiello <federico.mattiello@gmail.com>
Pesarin, F. and Salmaso, L. (2010) Permutation
Tests for Complex Data. Wiley: United Kingdom.
Pesarin F. (2001) Multivariate Permutation Tests
with Applications in Biostatistics Wiley: New York.
Federico Mattiello (2010) Some resampling-based procedures for ranking of multivariate populations, Master's Thesis, Faculty of Statistical Sciences: Padova.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ###
### testing SOUP
###
rm(list = ls()); gc(reset = TRUE)
require(SOUP)
n <- 5L # replication of the experiment
G <- 4L # number of groups
nVar <- 10L # number of variables
shift <- 1.5 # shift to be added to group 3
alpha <- c(0.01, 0.05, 0.1) # significance levels
## groups factor
groups <- gl(G, n, labels = paste("gr", seq_len(n), sep = "_"))
set.seed(12345)
Y <- matrix(rnorm(n * G * nVar), nrow = n * G, ncol = nVar)
colnames(Y) <- paste("var", seq_len(nVar), sep = "_")
ind1 <- groups == unique(groups)[3L]
Y[ind1, ] <- Y[ind1, ] + shift
res <- SOUP(Y = Y, covars = as.matrix(groups), analysisType = "simple",
testStatistic = "meanDiff", combFunct = "Fisher",
alpha = alpha,
subsets = list("first" = 1:5, "second" = 6:10),
weights = list(
"firstW" = c(.1, .2, .1, .5, .1),
"secondW" = rep.int(1, 5)),
p.valuesType = "permutation", p.adj.method = "FWEminP")
res
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.