Learn R Programming

arf3DS4 (version 2.5-4)

fitModel: Fit an ARF model.

Description

fitModel performs the fit-procedure of an ARF model to the data. It uses the values in the options object to modify the behavior of the fit-procedure. By default optim (L-BFGS-B) is used for minimization. fitModel is a wrapper for fitModelOptim and fitSimpleModelOptim

Usage

fitModel(arfmodel, options = loadOptions(arfmodel), 
 dat = readData(.model.avgdatfile(arfmodel)), 
 weights = readData(.model.avgWfile(arfmodel)), 
 printlevel = 0, try.silen = T)
fitModelOptim(arfmodel, options = loadOptions(arfmodel), 
 dat = readData(.model.avgdatfile(arfmodel)), 
 weights = readData(.model.avgWfile(arfmodel)), 
 printlevel = 0, try.silen = T)
fitSimpleModelOptim(arfmodel, options = loadOptions(arfmodel), 
 dat = readData(.model.avgdatfile(arfmodel)), 
 weights = readData(.model.avgWfile(arfmodel)), 
 printlevel = 0, try.silen = T)

Arguments

arfmodel
An arf model object (class model)
options
An "options" object (class options).The options@start.method slot is used to determine which method to use for starting values. The arfmodel@modeltype slot is used to determine whether to f
dat
An object of class "fmri.data" (fmri.data containing the averaged beta-values.)
weights
An object of class "fmri.data" (fmri.data containing the averaged weights of the beta-values.)
printlevel
Number indicating the level of output of the minimization procedure.
try.silen
Should errors be printed when they occur or only passed to the warnings slot.

Value

  • Returns an object of class "model" with the appropriate slots.

Details

fitModel calls one of the following functions based on the "options" object: fitModelOptim, fitSimpleModelOptim. These functions can also be called directly. Models can be created by calling newModel.

See Also

model, options, fmri.data, newModel