Open behinger opened 8 months ago
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))
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)
right now we can only do pseudo-continuous via discretizing [1,2,3,4,5] - would be good to have real continuous sampling ability