I have been thinking of modeling human timing data using jags where the data comes from an experiment where participants tap in time with a very slow metronome. The data is then a number of measurements of how "off" the tap was compared to the metronome. The data could be thought of as coming from a normal distribution. This would then be mock-up data for 10000 taps (using R):
timing_distribution <- rnorm(10000, 0, 300)
The problem is that when participants overshoot the target interval they instead react to the metronome tone. Say that reaction time is also from a normal distribution then mock-up data would be:
reaction_time_distribution <- rnorm(10000, 250, 50)
The timing distribution and the reaction time distribution could then be though of as being combined into a joint distribution like this:
joint_distribution <- pmin(timing_distribution, reaction_time_distribution)
That is whatever comes first the timing impulse or the reaction to tap after the metronome tone results in a tap.
My question is how could one go about modeling this in jags/bugs? What I'm after is someth ing like this
model {
for( i in 1 : N ) {
y[i] ~ min( dnorm( muTiming , tauTiming ), dnorm( muReaction , tauReaction ))
}
tauTiming ~ dgamma( 0.01 , 0.01 )
muTiming ~ dnorm( 0 , 1.0E-10 )
tauReaction ~ dgamma( 0.01 , 0.01 )
muReaction ~ dnorm( 0 , 1.0E-10 )
}
But I guess that y[i] ~ min( dnorm( muTiming , tauTiming ), dnorm( muReaction , tauReaction ))
is not really possible in jags...