Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

effects for LMMs #160

Merged
merged 2 commits into from
Feb 2, 2024
Merged

effects for LMMs #160

merged 2 commits into from
Feb 2, 2024

Conversation

behinger
Copy link
Member

@behinger behinger commented Dec 5, 2023

this finally adresses #113

What I havent implemented is for ContinuousTime LMMs, but that should be easy, I did run out of steam though, so at a later point

@jschepers what is the mention in #114 on a broken test?

ext/UnfoldMixedModelsExt/UnfoldMixedModelsExt.jl Outdated Show resolved Hide resolved
ext/UnfoldMixedModelsExt/UnfoldMixedModelsExt.jl Outdated Show resolved Hide resolved
ext/UnfoldMixedModelsExt/effects.jl Outdated Show resolved Hide resolved
ext/UnfoldMixedModelsExt/effects.jl Outdated Show resolved Hide resolved
src/predict.jl Outdated Show resolved Hide resolved
src/predict.jl Outdated Show resolved Hide resolved
src/predict.jl Outdated Show resolved Hide resolved
test/effects.jl Outdated Show resolved Hide resolved
test/effects.jl Outdated Show resolved Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
function StatsModels.modelmatrix(model::UnfoldLinearMixedModel, bool)
@assert bool == false "time continuous model matrix is not implemented for a `UnfoldLinearMixedModel`"
return designmatrix(model).Xs[1]
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
end
end

times(model::Union{<:UnfoldLinearMixedModel,<:UnfoldLinearModel}) = times(design(model))
times(
d::Dict{<:Union{Any,<:AbstractString,Symbol},<:Tuple{<:AbstractTerm,<:AbstractVector}},
) = first(values(d))[2]#[k[2] for k in values(d)] # probably going for steprange would be better


function gen_timeev(timesVec,nRows)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
function gen_timeev(timesVec,nRows)
function gen_timeev(timesVec, nRows)

evts,
data,
)
@test_broken eff = effects(Dict(:condition => ["car", "face"]), m)
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
end
end

@jschepers
Copy link
Collaborator

jschepers commented Dec 5, 2023

this finally adresses #113

What I havent implemented is for ContinuousTime LMMs, but that should be easy, I did run out of steam though, so at a later point

@jschepers what is the mention in #114 on a broken test?

I think it's about this broken test I wrote in the tests for the io functions. It's broken because effects was not defined for UnfoldLinearMixedModel.

@behinger behinger merged commit 458f50a into main Feb 2, 2024
5 of 6 checks passed
@behinger behinger deleted the effectsLMM branch March 19, 2024 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants