if (FALSE) {
data(italy2006)
str(italy2006)
italy2006[1:2,1:14]
election <- set.data(italy2006 , shape="wide", choice="vote",
varying=c(5:14), sep="_")
str(election)
m <- mlogit(vote~prox+partyID | gov_perf+sex+age+education,
election, reflevel = "UL")
summary(m)
true.pos <- list(FI=7.59, UL=3.50, RC=1.95, AN=8.08, UDC=5.66)
true.votes <- list(FI=.24, UL=.40, RC=.10, AN=.18, UDC=.08)
# model: comparison against true votes and party positions
nash.eq <- equilibrium(model=m, data=election, pos=true.pos,
votes=true.votes)
nash.eq
}
Run the code above in your browser using DataLab