Page 1 of 1

Categorical attributes and covariates

Posted: 21 Nov 2020, 17:19
by Rea
Dear all,

I am new to the forum and Apollo. If I have a categorical variable it is not to go for specifying it as a factor ('as.factor'), right? Apollo correctly gives me a warning message that non-numerics are included The right way is to always go for dummy coding instead?

Thanks in advance.
Best, Rea

Re: Categorical attributes and covariates

Posted: 21 Nov 2020, 19:24
by stephanehess
Yes, you're right

Re: Categorical attributes and covariates

Posted: 02 Feb 2022, 11:06
by asif_nawaz
Hello I am new to the choice modeling world
but I have learned quite a few things now
I am trying to estimate an RP_SP combined model and i was trying to tweak the available apollo_modechoice.R example
While using the mode_choice dataset, which is provided on the apollo website as an example
i observed every explanatory variable is defined as binary (0 or ) 1 or dummy, or in this dataset- income (viz., given as a continuous dataset )

Is there a way to code categorical like education,income(range) variables in apollo package similar to how to define the alternatives ?
I hope my question is clear :)

Re: Categorical attributes and covariates

Posted: 02 Feb 2022, 20:52
by stephanehess
Hi

yes, this is straightforward. See for example http://apollochoicemodelling.com/files/ ... variates.r

Stephane