StatsAPI.fit!Method

fit!(uf::UnfoldModel,data::Union{<:AbstractArray{T,2},<:AbstractArray{T,3}}) where {T<:Union{Missing, <:Number}}

Fit a DesignMatrix against a 2D/3D Array data along its last dimension Data is typically interpreted as channel x time (with basisfunctions) or channel x time x epoch (for mass univariate)

  • show_progress (default:true), deactivate the progressmeter

Returns an UnfoldModel object

Examples

source
StatsAPI.pvalueMethod
pvalue(lrtvec)

Unfold-Method: return pvalues of likelihoodratiotests, typically calculated:

Examples

julia> pvalue(likelihoodratiotest(m1,m2))

where m1/m2 are UnfoldLinearMixedModel's

Tipp: if you only compare two models you can easily get a vector of p-values:

julia> vcat(pvalues(likelihoodratiotest(m1,m2))...)

Multiple channels are returned linearized at the moment, as we do not have access to the amount of channels after the LRT, you can do:

julia> reshape(vcat(pvalues(likelihoodratiotest(m1,m2))...),ntimes,nchan)'

source
Unfold.make_estimateMethod
Unfold.make_estimate(m::Union{UnfoldLinearMixedModel,UnfoldLinearMixedModelContinuousTime},

) extracts betas (and sigma's for mixed models) with string grouping indicator

returns as a ch x beta, or ch x time x beta (for mass univariate)

source
Unfold.modelmatricesMethod
modelmatrices(modelmatrix::Tuple)

in the case of a Tuple (MixedModels - FeMat/ReMat Tuple), returns only the FeMat part

source
UnfoldMixedModels.fake_lmmMethod
fake_lmm(data, m, k)

Returns a partial LMM model (non-functional due to lacking data) to be used in likelihoodratiotests. k to selcet which of the modelfit's to fake

source
UnfoldMixedModels.isa_lmm_formulaMethod
isa_lmm_formula

iterates over all parts of a formula until either a MixedModels.zerocorr, or a | was found. Then returns true, else returns false.

source
UnfoldMixedModels.reorder_tidyσsMethod
reorder_tidyσs(t, f)

This function reorders a MixedModels.tidyσs output, according to the formula and not according to the largest RandomGrouping.

source