View source: R/baseline_model.R
baseline_model | R Documentation |
Builds a baseline model to account for noise and non–event-related variance. This model may include a drift term, a block intercept term, and nuisance regressors.
baseline_model(
basis = c("constant", "poly", "bs", "ns"),
degree = 1,
sframe,
intercept = c("runwise", "global", "none"),
nuisance_list = NULL
)
basis |
Character; type of basis function ("constant", "poly", "bs", or "ns"). |
degree |
Integer; degree of the spline/polynomial function. |
sframe |
A sampling_frame object. |
intercept |
Character; whether to include an intercept ("runwise", "global", or "none"). (Automatically set to FALSE when basis == "constant".) |
nuisance_list |
Optional list of nuisance matrices (one matrix per fMRI block). |
An object of class "baseline_model".
sframe <- sampling_frame(blocklens = c(100, 100), TR = 2)
bmod <- baseline_model(basis = "bs", degree = 3, sframe = sframe)
bmod_global <- baseline_model(basis = "bs", degree = 3, sframe = sframe, intercept = "global")
bmod_nointercept <- baseline_model(basis = "bs", degree = 3, sframe = sframe, intercept = "none")
stopifnot(ncol(design_matrix(bmod)) == 8)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.