Replies: 2 comments 6 replies
-
I love the named parameters; that makes the configuration much clearer! One should specify either Option 1. Add an error message if both are specificied? Option 2. Have a only the Specify distributions individually
Use posterior distribution of a previous run of jsQuestPlus
|
Beta Was this translation helpful? Give feedback.
-
Hi, @tpronk I've finished updating the code. Now, the set_prior function works. How to specify prior distributions individually // Example calculation for the prior PDF of threshold.
// Assume a Gaussian function with a mean of -18 and a standard deviation of 2.
const threshold_prior = jsQuestPlus.gauss(threshold_samples, -18, 2)
const jsqp = new jsQuestPlus({
psych_func: [func_resp0, func_resp1],
stim_samples: [contrast_samples],
psych_samples: [threshold_samples, slope_samples, guess, lapse_samples],
priors: jsQuestPlus.set_prior([threshold_prior, slope_samples.length, guess.length, lapse_samples.length]),
// The order of the priors must match the order of the psych_samples. To specify a uniform distribution (default), write the length of the parameter.
}) How to use the previous jsQuestPlus data as a prior distributionIn this case, the set_prior function is not needed. const jsqp2 = new jsQuestPlus({
psych_func: [func_resp0, func_resp1],
stim_samples: [contrast_samples],
psych_samples: [threshold_samples, slope_samples, guess, lapse_samples],
priors: jsqp1.posteriors // Specify the posteriors of the previous condition.
}) I would like to confirm, regarding the following English name, is it appropriate? Property names
Function names
File names
|
Beta Was this translation helpful? Give feedback.
-
Hi, @tpronk
First, let me explain an important change in the initialization of jsQuestPlus.
About change in the initialization
Before change
After change
These changes are necessary in order to specify the prior distribution. Sorry, but we also need to make changes to our paper.
Prior distributions
In previous jsQuestPlus, the prior for the psychometric parameters was uniformly distributed. Basically, that is fine, but the experimenter may want to specify the prior based on previous research or preliminary observations. I've updated jsQuestPlus for these requests.
Specify the prior distribution individually
See https://github.com/kurokida/jsQuestPlus/blob/dev/demos/prior1.html
Use the previous jsQuestPlus data as prior distribution
See https://github.com/kurokida/jsQuestPlus/blob/dev/demos/prior2.html
If you run https://github.com/kurokida/jsQuestPlus/blob/dev/demos/prior3.html, you'll see the estimated values of the parameters become more and more accurate with each simulation when using the previous jsQuestPlus data as prior distribution.
Sorry for the brief explanation.
If you have any questions, please don't hesitate to let me know.
Beta Was this translation helpful? Give feedback.
All reactions