ResSimulLvrRatio {CompR} | R Documentation |
Returns the result of Log Likelihood Ratio Test of the number of classes for Paired comparison data (T classes versus (T+1) classes)
ResSimulLvrRatio(Data,ResH0,Constraint,nsimul,level,eps=1e-04,eps1=1e-04)
Data |
Object of class |
ResH0 |
Object of class |
Constraint |
Kind of constraint on Bradley's scores. If |
nsimul |
number of Monte Carlo simulations |
level |
level of the Log Likelihood Ratio test defined by the user (default |
eps |
value of the convergence criteria for the EM algorithm (default |
eps1 |
value of the criteria convergence for Dykstra algorithm (default |
The likelihood ratio test is based on a Monte Carlo procedure. A simulation of nsimul
data set is done. We perform estimation of the different parameters for the number of classes defined in the object ResH0
of class BradleyEstim
(corresponding to
the null hymothesis) and for one more class corresponding to the alternative hypothesis.
We obtain a set of Log Likelihoods under the null and alternative hypothesis on the basis of simulated data and so of the Log Likelihood Ratio Statistic.
We replace the observed value of this statistic for the true data set. And we conclude on the acceptation or not of the null hypothesis (no differences between T and T+1 classes).
Object of class LvrRatio
with the following components:
Simu |
Matrix with the number of classes under H0, Loglikelihoods under H0 and H1, difference between these Loglikelihoods. |
Test |
Matrix with the level of the test and the associated quantile |
data(Cocktail) ResCock1<-EstimBradley(Cocktail,Constraint=0,Tcla=1,eps=1e-04,eps1=1e-04,TestPi=TRUE) Res_LvrRatio1<-ResSimulLvrRatio(Cocktail,ResCock1,0,3,level=0.05,eps=0.001,eps1=0.001) getSimu(Res_LvrRatio1) getTest(Res_LvrRatio1)