ODK Meta - Repeat Groups not merging

Hi @Musinguzi_Polycarp!

odkmeta will automatically detect repeat groups in your XLSForm and will add merge and reshape commands to the do-file. In other words, you don't need to specify anything extra for odkmeta to work with repeat groups. If you do run into issues, there are some threads on the forum related to odkmeta and merging that may be helpful. (odkmeta certainly does not require you to be a Stata expert, but it may require some troubleshooting.)

Hope that helps!

Hi @Matthew_White ,

Thanks a lot for your guidance. However, I have run into another problem (see attachment below).


I have read through some threads and they seem to indicate that this issue could be related to having duplicate variable names as a result of splitting multiple choice questions. However looking at that Q112a, it wouldn't result into any duplicates since there isn't any other variable named Q112a1. In fact, there's another multiple choice question in that repeat group (Q112d) that triggers the same error.

Any thoughts on what's causing this and how to make it right?. Thanks

1 Like

I'm not sure I've ever seen this error message outside the context of duplicate variable names. I'm not sure what the issue is, but looking at the output, it seems that Q112a may have all missing values. Maybe split can't be run on such a variable? (Is it expected that no data was collected for that variable?)

If that's the case about split, then the logic in the do-file will need to change slightly. I'll think more about how to modify that logic. I think a workaround for now would be to remove Q112a from your XLSForm before exporting the survey sheet to CSV. Then the do-file won't recognize Q112a as select_multiple and won't try to split it.

Hello Mathew,

Thanks for your quick response. Actually, as per the data that has already been submitted, Q112a and Q112d have a few responses. However, if both Questions are removed from the CSV, odkmeta runs successfully. Not sure what could be causing this

Hello,
What do you mean to re export the survey and choices. I have an issue of assertion is false
When I run the do file from odkmeta. for me I have just saved survey sheet as CSV and choices sheet as CSV. Am I using the right methods or there is a link that explain how to create survey and choices when you are going to use odkmeta.

Thank you!