| mdprefmx {lazy.mdpref} | R Documentation | 
Finite Mixture Model for MDPREF
mdprefmx( f, n, ij, subj, ndim = 2, nclass = 2, alpha = 1, init = 2, X = NULL, B = NULL, rho = NULL, estX = 1, estB = 1, estrho = 1, minp = 1e-07, lmax = 10, eps = 1e-06, lmax2 = 3, print = 1, plot = 0 )
f | 
 vector consisting of the # of times that the left stimuli was chosen out of n trials.  | 
n | 
 vector consisting of the # of trials.  | 
ij | 
 matrix indicating the stimulus pair.  | 
subj | 
 vector indicating the subject.  | 
ndim | 
 # of dimensions  | 
nclass | 
 # of laten classes  | 
alpha | 
 hyper-parameter vector of size nclass for Dirichlet prior of rho  | 
init | 
 method for initial configuration  | 
X | 
 initial configuration, if any  | 
B | 
 initial configuration, if any  | 
rho | 
 initial configuration, if any  | 
estX | 
 = 0 to skip the estimation of X and fix it to the value given in X.  | 
estB | 
 = 0 to skip the estimation of B and fix it to the value given in B.  | 
estrho | 
 = 0 to skip the estimation of rho and fix it to the value given in rho.  | 
minp | 
 minimum value of the probability  | 
lmax | 
 max # of iterations  | 
eps | 
 criterion for convergence  | 
lmax2 | 
 max # of iterations for the inner iteration for X and Beta  | 
print | 
 = 1 to print the result  | 
plot | 
 = 1 to plot the result  | 
The quartet
( subj, n, f, ij ) contains the result of the paired comparison data.
Thoese four objects has the same length or # of rows.
The k-th elements of the quartet indicates that 
subj[k] preferred stimulus ij[k,1] over ij[k,2] f[k] times when exposed
to the pair n[k] times.
The paired comparizon for each subject does no have to be complete.
ij <- cbind( data_comp$ij.1, data_comp$ij.2) mdprefmx( f=data_comp$f, n=data_comp$n, ij=ij, subj=data_comp$subj, plot=1 ) ij <- cbind( data_miss$ij.1, data_miss$ij.2) mdprefmx( f=data_miss$f, n=data_miss$n, ij=ij, subj=data_miss$subj, plot=1 )