QDECR
Here I will discuss some of the research-related things that you need to ask yourself before you can actually get started. I will also refer to some R information.
QDECR
R
is a programming language with extensive functionality related to statistical analyses. QDECR
is written to capitalize on some of this functionality, including:
AsIs
(‘as is’) treatment of data within formulas, i.e. being able to manipulate the data while specifying the formulaAll these features can be found in QDECR
.
The core qdecr
function follows a number of steps:
Within QDECR
all vertex measures that Freesurfer calculates have default names. This is qdecr_
combined with the name of the vertex measure file. A comprehensive list:
Note that qdecr_w-g.pct does not work yet.
Nearly all statistical model functions in R
utilize formula
objects. The formula
object allows users to generate design matrices for subsequent analysis through straightforward syntax:
Y ~ a + b
Lets deconstruct this:
Y
: The outcome (AKA dependent variable AKA label)~
: Denotes the left-hand side versus the right-hand side of the formulaa + b
: The additive effect of determinants a
and b
(AKA independent variables AKA features)This format allows users to use simple pseudo-math to generate complicated design matrices. R
handles design making for incomplete data, conversion of categorical variables to e.g. dummy variables, etc.
QDECR
uses the formula
object to allow users to easily create design matrices. It further extends this functionality by explicitly including the vertex measure as a variable in the formula:
qdecr_thickness ~ a + b
R
also allows users to apply more complicated formulas:
Y ~ a:b
Y ~ a * b
[equivalent to Y ~ a + b + a:b
]Y ~ a + poly(b, 2, raw = TRUE)
[equivalent to Y ~ a + b + I(b^2)
]Y ~ a + poly(b, 2)
splines
package): Y ~ bs(a, 3)
Furthermore, R
features AsIs
treatment of objects, meaning that variables can be manipulated within the formula
object itself using I()
. This allows users to do all kinds of things in the formula itself, including:
Y ~ I(scale(a))
Y ~ I(a + 2*b)
By extension, QDECR
has all these features.
Datasets may contain missing information. The missing information can be imputed under certain conditions. Commonly used R package for imputation are mice
and mi
. We designed R in such a way that imputed datasets can be used as the input dataset, without any specifications by the user. QDECR currently supports imputed objects from Amelia
, mi
, mice
, and missForest
.
Users may want to reduce computation time by utilizing multiple processes. QDECR has the n_cores
argument that allows users to specify the number of processes (cores/threads) to use. Note that the benefit of using multiple processes is most evident when increasing the number of imputed datasets.
[Next vignette: 4. Post-processing]