Hi everyone,
I import data from access, and make an object (c) store the data,
when I want to use it in function mnp, it gives the below error:
Error in dimnames(x) <- dn : length of 'dimnames' [2] not equal to
array
extent
> x<-odbcConnectAccess("db2.mdb")
> c<-sqlFetch(x,"Sheet2")
> odbcClose(x)
> c
choice clio punto polo
1 3 10.08163 10.05406 10.07323
2 1 10.08163 10.05406 10.07323
3 2 10.08163 10.05406 10.07323
4 1 10.08163 10.05406 10.07323
5 2 10.08163 10.05406 10.07323
.........and 607 more
> res1 <- mnp(choice ~ 1, choiceX = list(Clio= clio, Punto= punto,
Polopolo), cXnames = "price", data = c, n.draws = 100, verbose = TRUE)
Error in dimnames(x) <- dn : length of 'dimnames' [2] not equal to
array
extent
clio, punto and polo are the x's,
I would appreciate if anyone helps me on this,
Thanks,
Ozlem Ipekci
[[alternative HTML version deleted]]