diff --git a/ext/UnfoldMixedModelsExt/statistics.jl b/ext/UnfoldMixedModelsExt/statistics.jl index fc615841..5db10727 100644 --- a/ext/UnfoldMixedModelsExt/statistics.jl +++ b/ext/UnfoldMixedModelsExt/statistics.jl @@ -6,14 +6,13 @@ Returns a partial LMM model (non-functional due to lacking data) to be used in l """ function fake_lmm(m::UnfoldLinearMixedModel, k::Int) mm = modelmatrix(m) - @assert length(mm) == 1 "LRT currently not implemented for fitting multiple events at the same time" + @assert length(mm) == 1 "LRT is currently not implemented for fitting multiple events at the same time" feterm = mm[1][1] #reterm = mm[2:end] fakeY = zeros(size(feterm, 1)) lmm = LinearMixedModel_wrapper(Unfold.formulas(m), fakeY, mm[1]) fcoll = Unfold.modelfit(m) - #lmm.objective .= fcoll.fits[1].objective #lmm.optsum.feval .= 1 #lmm.optsum.fmin .= 1 lmm.optsum.sigma = fcoll.fits[k].σ diff --git a/ext/UnfoldMixedModelsExt/typedefinitions.jl b/ext/UnfoldMixedModelsExt/typedefinitions.jl index 340a7130..87f477bd 100644 --- a/ext/UnfoldMixedModelsExt/typedefinitions.jl +++ b/ext/UnfoldMixedModelsExt/typedefinitions.jl @@ -70,7 +70,7 @@ Concrete type to implement an deconvolution LinearMixedModel. `.design` contains the formula + times dict `.designmatrix` contains a `DesignMatrix` -`modelfit` is a `Any` container for the model results +`.modelfit` is a `Any` container for the model results """ mutable struct UnfoldLinearMixedModelContinuousTime{T} <: UnfoldModel{T} design::Vector{<:Pair} diff --git a/src/basisfunctions.jl b/src/basisfunctions.jl index a1d23aac..b320eb5d 100644 --- a/src/basisfunctions.jl +++ b/src/basisfunctions.jl @@ -4,7 +4,7 @@ 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 predictor-columns (e.g. HRF 1 to 3, FIR height()-1 ) +- width() # number of coefficient columns (e.g. HRF 1 to 3, FIR height()-1 ) - colnames() # unique names of expanded columns - times() # vector of times along expanded columns, length = height() diff --git a/src/fit.jl b/src/fit.jl index 2141cf4b..2adf1a20 100644 --- a/src/fit.jl +++ b/src/fit.jl @@ -133,7 +133,7 @@ function StatsModels.fit!( if isa(uf, UnfoldLinearModel) - @assert length(times(uf)) == size(data, length(size(data)) - 1) "Times Vector does not match second last dimension of input data - forgot to epoch?" + @assert length(times(uf)) == size(data, length(size(data)) - 1) "Times Vector does not match second last dimension of input data - forgot to cut into epochs?" end X = modelmatrix(uf) @@ -230,7 +230,7 @@ function design_to_modeltype(design) ext = Base.get_extension(@__MODULE__, :UnfoldMixedModelsExt) if isnothing(ext) throw( - "MixedModels not loaded. Please use `]add MixedModels` and `using MixedModels` to install it prior to using", + "MixedModels is not loaded. Please use `]add MixedModels` and `using MixedModels` to install it prior to using", ) end end @@ -250,5 +250,3 @@ function design_to_modeltype(design) end return UnfoldModelType end - -