Unfold.BasisFunction โ€” Type

See FIRBasis for an examples

a BasisFunction should implement:

  • kernel() # kernel(b::BasisFunction,sample) => returns the designmatrix for that event

  • height() # number of samples in continuous time

  • width() # number of coefficient columns (e.g. HRF 1 to 3, FIR=height(),except if interpolate=true )

  • colnames() # unique names of expanded columns

  • times() # vector of times along expanded columns, length = height()

  • name() # name of basisfunction

  • collabel() [default "colname_basis"] # name for coeftable

  • shift_onset() [default 0]

source
Unfold.DesignMatrixLinearModel โ€” Type
DesignMatrix

Type that keeps an Array of formulas, designmatrices modelmatrix (Array or Array of Arrays in case of MixedModel) and events-dataframe

source
Unfold.FIRBasis โ€” Type

Defines a FIRBasisfunction which can be called for each event, defining the time-expanded basis kernel

mutable struct FIRBasis <: Unfold.BasisFunction
  • times: vector of times along rows of kernel-output (in seconds)

  • name: name of the event, should be the actual eventName in eventcolumn of the dataframes later

  • shift_onset: by how many samples do we need to shift the event onsets? This number is determined by how many 'negative' timepoints the basisfunction defines

  • interpolate: should we linearly interpolate events not on full samples?

(tipp: most users would you want to call firbasis, not generate it manually)

Examples

julia>  b = FIRBasis(range(0,1,length=10),"basisA",-1)
source
Unfold.TimeExpandedTerm โ€” Type

Object with a term and an applicable BasisFunction and a eventfield that are later passed to the basisfunction.

struct TimeExpandedTerm{T<:StatsModels.AbstractTerm} <: StatsModels.AbstractTerm
  • term: Term that the basis function is applied to. This is regularly called in other functions to get e.g. term-coefnames and timeexpand those

  • basisfunction: Kernel that determines what should happen to the designmatrix of the term

  • eventfields: Which fields of the event-table should be passed to the basisfunction.Important: The first entry has to be the event-latency in samples!

Examples

julia>  b = TimeExpandedTerm(term,kernel,[:latencyTR,:durationTR])
source
Unfold.UnfoldLinearModel โ€” Type

Concrete type to implement an Mass-Univariate LinearModel. .design contains the formula + times dict .designmatrix contains a DesignMatrix modelfit is a Any container for the model results

source
Unfold.UnfoldLinearModelContinuousTime โ€” Type

Concrete type to implement an deconvolution LinearModel. .design contains the formula + times dict .designmatrix contains a DesignMatrix modelfit is a Any container for the model results

source
Unfold.UnfoldModel โ€” Type

using Base: @deprecate_binding The main abstract model-type of the toolbox. E.g. UnfoldLinearModel is a concrete type of this

source