Predict after running the mlogit function in R

Here's what I want to do, but there seem to be no predict method for the mlogit. Any ideas?

library(mlogit)
data("Fishing", package = "mlogit")
Fish <- mlogit.data(Fishing, varying = c(2:9), shape = "wide", choice = "mode")

Fish_fit<-Fish[-1,]
Fish_test<-Fish[1,]
m <- mlogit(mode ~price+ catch | income, data = Fish_fit)
predict(m,newdata=Fish_test)

-
Did you read the accompagnying vignette, Estimation of multinomial logit models in R : The mlogit Packages? It seems to me you just have to apply the fitted coefficients on new data, isn't it? –  chl Jan 30 '11 at 10:14
@chl that's what I need to do, yes, but I was hoping I wouldn't have to re-invent the wheel. –  Zach Feb 15 '11 at 17:50

The mlogit package does have a predict() method, at least in the version I'm using ( 0.2-3 with R 2.15.3).

The code put up by @Zach has one error in it. The "long format" data used by mlogit() has one row for each alternative; this is the format created by the mlogit.data() function. Therefore to get a prediction for the first case you need to pull out all the rows for that case, and there are 4:

Fish_fit<-Fish[-(1:4),]
Fish_test<-Fish[1:4,]
m <- mlogit(mode ~price+ catch | income, data = Fish_fit)
predict(m,newdata=Fish_test)


which gives a good result.

-