Page 1 of 1

Convert mlogit data format into apollo data format

Posted: 24 Dec 2022, 11:33
by LucaN
Dear authors,

I would like to convert data from mlogit data format (generated vith the function dfidx: https://cran.r-project.org/web/packages ... dfidx.html) in apollo data format. How can I easily and quickly do that?

I found this function https://search.r-project.org/CRAN/refma ... pollo.html but 1) it seems rather cumbersome; 2) it does not seem to be available in the package support.BWS.

Thank you,
L

Re: Convert mlogit data format into apollo data format

Posted: 02 Feb 2023, 13:23
by stephanehess
Hi

apologies for the slow reply. The function apollo_longToWide is already available in a pre-release version from apollo 0.2.8 onwards. that might do the trick for you

Try

Code: Select all

?apollo_longToWide
Stephane

Re: Convert mlogit data format into apollo data format

Posted: 18 Dec 2023, 08:50
by frieda.ritter
Write a custom R function that takes a dataset in mlogit format as input and transforms it into the desired apollo format. This function should handle the conversion of variables, structures, and any other necessary adjustments.