Description Usage Arguments Value Examples
View source: R/spm12_contrast.R
Build contrasts for SPM12 first level model
1 2 3 4  | spm12_contrast(name, weights, replicate = c("none", "repl", "replsc",
  "sess", "both", "bothsc"))
spm12_contrast_list(cons, type = "T")
 | 
name | 
 Name of the contrast  | 
weights | 
 Weights of the contrast, must be the same length as the number of regressors  | 
replicate | 
 If  there  are  multiple  sessions with 
identical conditions, one might want to specify contrasts 
which are identical over sessions. Options are 
no replication (  | 
cons | 
 List of contrasts  | 
type | 
 type of contrast, T-statistic or F-statistic  | 
A list of objects, each with a name and value
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  | res = spm12_contrast(name = "condition1", weights = c(
1, rep(0, 8)))
print(res)
contrasts = list(
list(name = "LeftHand",
       weights = c(1, rep(0, 7)),
replicate = "none",
type = "T" ),
list(name = "RightHand",
weights = c(0, 1, rep(0, 6)),
replicate = "none",
type = "T"), 
list(name = "AllEffects",
weights = rbind(
c(1, rep(0, 7)),
         c(0, 1, rep(0, 6))
       ),
replicate = "none",
type = "F")   
)
res = spm12_contrast_list(contrasts)
print(res)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.