R Under development (unstable) (2023-12-02 r85657 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(ordinal) > data(wine) > > fm1 <- clm(rating ~ temp, data=wine) > fmm1 <- clmm(rating ~ temp + (1|judge), data=wine) > > ## These now give identical printed results: > ## Previously the printed model names were messed up when anova.clmm > ## were called. > anova(fm1, fmm1) Likelihood ratio tests of cumulative link models: formula: link: threshold: fm1 rating ~ temp logit flexible fmm1 rating ~ temp + (1 | judge) logit flexible no.par AIC logLik LR.stat df Pr(>Chisq) fm1 5 194.03 -92.013 fmm1 6 189.48 -88.739 6.5492 1 0.01049 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > anova(fmm1, fm1) Likelihood ratio tests of cumulative link models: formula: link: threshold: fm1 rating ~ temp logit flexible fmm1 rating ~ temp + (1 | judge) logit flexible no.par AIC logLik LR.stat df Pr(>Chisq) fm1 5 194.03 -92.013 fmm1 6 189.48 -88.739 6.5492 1 0.01049 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > ## Testing if 'test' and 'type' arguments are ignored properly: > fm1 <- clm(rating ~ temp + contact, data=wine) > fm2 <- clm(rating ~ temp, data=wine) > anova(fm1, fm2, test="Chi") 'test' argument ignored in anova.clm Likelihood ratio tests of cumulative link models: formula: link: threshold: fm2 rating ~ temp logit flexible fm1 rating ~ temp + contact logit flexible no.par AIC logLik LR.stat df Pr(>Chisq) fm2 5 194.03 -92.013 fm1 6 184.98 -86.492 11.043 1 0.0008902 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > anova(fm1, fm2, type="Chi") Likelihood ratio tests of cumulative link models: formula: link: threshold: fm2 rating ~ temp logit flexible fm1 rating ~ temp + contact logit flexible no.par AIC logLik LR.stat df Pr(>Chisq) fm2 5 194.03 -92.013 fm1 6 184.98 -86.492 11.043 1 0.0008902 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > anova(fm1, fm2) Likelihood ratio tests of cumulative link models: formula: link: threshold: fm2 rating ~ temp logit flexible fm1 rating ~ temp + contact logit flexible no.par AIC logLik LR.stat df Pr(>Chisq) fm2 5 194.03 -92.013 fm1 6 184.98 -86.492 11.043 1 0.0008902 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > ## calling anova.clmm > anova(fmm1, fm1, test="Chi") 'test' argument ignored in anova.clm Likelihood ratio tests of cumulative link models: formula: link: threshold: fmm1 rating ~ temp + (1 | judge) logit flexible fm1 rating ~ temp + contact logit flexible no.par AIC logLik LR.stat df Pr(>Chisq) fmm1 6 189.48 -88.739 fm1 6 184.98 -86.492 4.4938 0 > anova(fmm1, fm1, type="Chi") Likelihood ratio tests of cumulative link models: formula: link: threshold: fmm1 rating ~ temp + (1 | judge) logit flexible fm1 rating ~ temp + contact logit flexible no.par AIC logLik LR.stat df Pr(>Chisq) fmm1 6 189.48 -88.739 fm1 6 184.98 -86.492 4.4938 0 > > > proc.time() user system elapsed 1.43 0.23 1.65