Page 1 of 1
Download dataset for analysis
Posted: January 10th, 2022, 10:34 pm
by Deepndra
When I download the data for analysis, the multiple response questions do not come in a separate column (as separate variables), rather they appear in a single column with the multiple options in the same cell as a string variable? How shall I download a dataset with the multiple response variables in different columns?
Re: Download dataset for analysis
Posted: January 11th, 2022, 10:54 am
by sherrell
Unfortunately you'll need to run a short post-capture processing routine to split out the values you've collected into (new) individual variables.
Sherrell
Re: Download dataset for analysis
Posted: January 20th, 2022, 7:24 am
by KAPALA
Suppose you had 4 options in a multiple response questions which are A, B, C, D and let say this is question number G04 in your dataset. Since these answers are in multiple you may find that sometimes you can have answers like AB, AC, DC e.t.c. In order to carry out analysis you have to separate these answers and create new variable. Basing on the scenario i have created you will use the following codes
gen GO4A = strpos(G04, "A")
gen G04B = strpos(G04, "B")
gen G04C = strpos(G04, "C")
gen G04D = strpos(G04, "D")
This code will create new variables.
Regards
Albert Kapala
Re: Download dataset for analysis
Posted: January 20th, 2022, 11:27 am
by sherrell
Albert, did you write a function named strpos? For there is no function with this name in CSPro.
What should be done is a call to the pos or poschar function. Any non-zero value means the value exists. For example, using the pos function, you would write:
numeric GO4A = pos("A", G04) > 0;
numeric GO4B = pos("B", G04) > 0;
numeric GO4C = pos("C", G04) > 0;
numeric GO4D = pos("D", G04) > 0;
https://www.csprousers.org/help/CSPro/pos_function.html
https://www.csprousers.org/help/CSPro/p ... ction.html
Sherrell
Re: Download dataset for analysis
Posted: February 6th, 2022, 2:20 am
by KAPALA
Hi!
This is your message
"When I download the data for analysis, the multiple response questions do not come in a separate column (as separate variables), rather they appear in a single column with the multiple options in the same cell as a string variable? How shall I download a dataset with the multiple response variables in different columns?"
I wrote those codes by assuming that you have downloaded the data as you said. Those are STATA Codes for analysis of Multiple Response Variable and not in CSPro.
Re: Download dataset for analysis
Posted: February 6th, 2022, 11:04 am
by etuser
I usually use the dictionary to parse the multiple response variable, what you can do is , let say , if you have a variable of length 5 which is an alpha and store multiple response (Check box) , create a new dictionary by saving as the original dictionary and modify the variable as length 1 and occurs 5 times and then use the "flatten" option of a dictionary to parse the variable into five separate variables of length 1 for each, then open the data in data viewer and save as the data as .txt and use use the usual export using the new dictionary and the new .txt data
Re: Download dataset for analysis
Posted: February 8th, 2022, 1:56 pm
by KAPALA
Thank You!