Return a model object extracted either from a data model instance or an object storing posterior samples. The function checks also
When x stores DMI of one participant, if DMI is a data.frame
,
When x is an object of posterior samples, if x is a list of many subjects,
whether model is successfully created,
whether prior is suppled or we can extract it from 'samples'
CheckDMI(x = NULL, prior = NULL, theta1 = NULL, nchain = NULL)
a data-model instance
a parameter prior list
a user-supplied theta cube
number of MCMC chains