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

Design should allow true continuous predictors #31

Open
behinger opened this issue Nov 8, 2023 · 2 comments
Open

Design should allow true continuous predictors #31

behinger opened this issue Nov 8, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@behinger
Copy link
Member

behinger commented Nov 8, 2023

right now we can only do pseudo-continuous via discretizing [1,2,3,4,5] - would be good to have real continuous sampling ability

@behinger behinger added the enhancement New feature or request label Nov 8, 2023
@behinger
Copy link
Member Author

Maybe we can create a pull request to MixedModelsSim with the interface to provide a Distribution.jl object from MixedModelsSim would then sample from?

something like Dict(:condition = ["A","B"],:continuous => Uniform(10,20))

@behinger
Copy link
Member Author

Adding this to mixedModelsSim might not be really useful, as they try to make a balanced design. So Judith and I came up with following idea: Yet another design!

struct AddSaccadeAmplitudeDesign4{T} <: AbstractDesign
    design::T
    colname::Symbol
    dist::Distribution
    rng::Any
end
function generate_events(d::AddSaccadeAmplitudeDesign4)
    df = generate_events(d.design)
    df[!, d.colname] .= rand(d.dist, size(df, 1))
    return df
end

design = UnfoldSim.AddSaccadeAmplitudeDesign4(design,:rt,Normal(0,1),MersenneTwister(1))
generate_events(design)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant