Displaying 1 result from an estimated 1 matches for "perschoic".
Did you mean:
perschoice
2003 Jan 29
3
multinomial conditional logit models
...able indexing the
choices (newy)
* A dichotomous variable must indicate which duplicate corresponds
with the respondent's choice (didep)
I've done this as follows:
mclgen <- function (datamat,catvar) {
ncat <- nlevels(catvar)
id<-1:length(catvar)
datamat<-cbind(id,datamat)
perschoice <-NULL
for (i in 1:ncat) {
perschoice<-rbind(perschoice,datamat)
}
perschoice<-perschoice[sort.list(perschoice$id),]
perschoice$newy<-gl(ncat,1,length=nrow(perschoice))
dep<-parse(text=paste("perschoice$",substitute(catvar),sep=""))
perschoice$depvar<-...