[R-sig-ME] clmm2() thresholds - forcing symmetry around zero

Rune Haubo rune.haubo at gmail.com
Mon Dec 12 08:38:48 CET 2016


It seems that you are looking for clmm(...., threshold="symmetric2").
This threshold argument is valid for clmm, but apparently I forgot to
document it for clmm, so take a look at help(clm) instead.

> library(ordinal)
> fmm1 <- clmm(rating ~ temp + contact + (1|judge), data=wine,
+ threshold="symmetric2")
> logLik(fmm1)
'log Lik.' -89.97856 (df=5)

If you want to fix one or more parameters while optimizing the rest,
you will have to use fmm2 <- clmm( ...., doFit=FALSE). fmm2 is a
'model environment' which you can optimize, e.g. using, say nlminb or
ucminf:

> fmm2 <- clmm(rating ~ temp + contact + (1|judge), data=wine,
+ threshold="symmetric2", doFit=FALSE)
> obj.fun <- ordinal:::getNLA.ssr # objective function: negative Laplace log-likelihood
> obj.fun(fmm2)
[1] 98.5057
> library(ucminf)
> fit <- ucminf(fmm2$par, function(par) obj.fun(fmm2, par))
> fit$value
[1] 89.97856

Fixing one or more parameters means modifying 'function(par)
obj.fun(fmm2, par)' to only optimize over select parameters.

Cheers
Rune

On 7 December 2016 at 04:08, Kristin Precoda <kristin.precoda at mq.edu.au> wrote:
> Hi,
>
> I'm using clmm2() to fit a model with three possible response categories (win, tie, lose).  For the particular problem, the thresholds need to be symmetric around zero, so win|tie = -1 * tie|lose.  Is there a way either to force the thresholds to be symmetric around zero, or to just set the thresholds (for example, to -1 and +1) and not optimize them?
>
>
> Thanks very much,
>
> Kristin
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models



More information about the R-sig-mixed-models mailing list