I am trying to analyse rank-ordered data using a logit model as described here (more specifically the model in 5.1). Right now I am not interested in the effect of any covariates but only want to asses the item specific differences by looking at the corresponding log odds. If I understand correctly I can achieve this by only including a constant term as the individual specific variable and removing any other intercepts. I am using the mlogit package in R and from what I have gathered from the vignette (especially the example for rank-ordered logit models in 2.8) I tried to do the following:
library(mlogit)
data("Game", package = "mlogit")
G <- mlogit.data(Game, shape="wide", choice="ch", varying=1:12, ranked=TRUE)
summary(mlogit(ch ~ 1 | -1 | -1,G))
This gets me the following error message:
Error in `rownames<-`(`*tmp*`, value = c("1.GameBoy", "1.GameCube", "1.PC", :
attempt to set 'rownames' on an object with no dimensions
It is pretty obvious that I have a misconception about the way the mlogit formula has to be constructed so I tried to play around a bit and the only thing I got which looked like what I wanted was the following:
Call:
mlogit(formula = ch ~ alt | -1 | -1, data = G, method = "nr",
print.level = 0)
Frequencies of alternatives:
GameBoy GameCube PC PlayStation PSPortable Xbox
0.13846 0.13407 0.17363 0.18462 0.17363 0.19560
nr method
4 iterations, 0h:0m:0s
g'(-H)^-1g = 0.000575
successive function values within tolerance limits
Coefficients :
Estimate Std. Error t-value Pr(>|t|)
GameCube:(intercept) 0.058678 0.182572 0.3214 0.747911
PC:(intercept) 1.275749 0.194292 6.5661 5.164e-11 ***
PlayStation:(intercept) 1.273903 0.191226 6.6618 2.705e-11 ***
PSPortable:(intercept) 0.622355 0.181645 3.4262 0.000612 ***
Xbox:(intercept) 1.401230 0.189758 7.3843 1.532e-13 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Log-Likelihood: -546.82
However, this is not very satisfactory since to me it seems strange to include the alternative as an individual specific covariate. Can anyone with experience of how to fit such a model in R using the mlogit package help?
P.S.: I was unsure whether this question is better suited for CV or StackOverflow but since the underlying question is a statistical one I chose to put it here.