Warning messages: 1: In if (n >= 10000L) return(TRUE) : the condition has length > 1 and only the first element will be used

I am running a mixed logit model using 'mlogit' for a choice experiement data of 866 respondents for a dependent variable choice and 4 independent variables as seen-price bt qr antibio. Following is the code and errors.

RCEchoice.mxl <- mlogit(CHOICE ~ price + bt + qr + antibio
,rpar = c(bt= 'n', qr = 'n'
, antibio= 'n')
, data=dbchoice.data
, reflevel = "3"
,correlation = TRUE, halton = TRUE,
R = 10)
summary(RCEchoice.mxl)

Error: Error: $ operator is invalid for atomic vectors

Warning messages:
1: In if (n >= 10000L) return(TRUE) :
the condition has length > 1 and only the first element will be used
2: In if (n >= 10000L) return(TRUE) :
the condition has length > 1 and only the first element will be used
3: In if (n >= 10000L) return(TRUE) :
the condition has length > 1 and only the first element will be used
4: In if (n >= 10000L) return(TRUE) :
the condition has length > 1 and only the first element will be used
5: In if (n >= 10000L) return(TRUE) :
the condition has length > 1 and only the first element will be used
6: In if (n >= 10000L) return(TRUE) :
the condition has length > 1 and only the first element will be used

Thanks for providing code. Could you kindly take further steps to make it easier for other forum users to help you? Share some representative data that will enable your code to run and show the problematic behaviour.

How do I share data for a reprex?

You might use tools such as the library datapasta, or the base function dput() to share a portion of data in code form, i.e. that can be copied from forum and pasted to R session.

Reprex Guide

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.