Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • MIXLOGITWTP: Using MIXLPRED to estimate out-of-sample predictions conditional on individual tastes as in Revelt and Train (2000)

    Hello,

    I am attempting to use MIXLPRED of the MIXLOGITWTP package to estimate out-of-sample predictions that conditions on the individual's in-sample sequence of choices, as described in Revelet and Train (2000). In particular, I have a training sample (train1_long) on which I estimate the model and a test set (test1_long), consisting of the same set of individuals identified by "sid":

    Code:
    use train1_long, clear
    global randvars2 "x1 x2 x3 x4"
    qui mixlogitwtp ch , rand($randvars2) price(self) group(ObsID) id(sid) nrep(200) vce(cluster sid)
    matrix a = e(b)
    matrix c = a[1,1..6],0,0,0,0,a[1,7],0,0,0,a[1,8],0,0,a[1,9],0,a[1,10]
    mixlogitwtp ch , rand($randvars2) price(self) group(ObsID) id(sid) nrep(200) corr from(c, copy) vce(cluster sid)
    Now, I would like to use this estimated model conditional on each individuals' sequence of choices in train1_long to make predictions in test1_long, as is done in Revelt and Train (2000, pp. 7-8). As far as I understand, if I use the MIXLPRED directly on the the test set as follows:

    Code:
    use test1_long, clear
    mixlpred pred , nrep(200)
    the unconditional choice probability is calculated. That is, without conditioning on each individual's sequence of choices in the training data. This seems to be the case since the out-of-sample log loss of using individual-level parameters estimated by MIXLBETA to estimate choice probabilities is much lower than that of using MIXLPRED. Rather the latter is closer to the out-of-sample log-loss of a standard conditional logit. Hence my question:

    Is there anyway one can use the MIXLPRED command to estimate out-of-sample predictions as is done in Revelt and Train (2000)?

    Many thanks in advance and best regards,
    Jesper
Working...
X