I generate a Vignette Universe from multiple dimensions and levels. Say for example 3000 texts

Then from these 3000 texts I am picking randomly around say 300 texts

Later I am generating decks say around 10 decks, so each deck has 300/10 = 30 texts, which again i am randomly assigning.

Finally I generate individual csv file for all the 10 decks.

Note: The header yes I can remove, and the 'EmployeeInfo' is not fixed the name varies and also i can generate the keys in the decks according to the sosci survey requirement. I see you separated the key to get the number which i can provide while generating the decks.

So, based on these, next steps would be,

Create questionnaire in sosci survey, and import the decks like.

Question 1(EmployeeInfo Deck1)
Answer1

Question 2(StudentInfo Deck1)
Answer 2

So, if there are 4 rows in each decks then i would like to generate in total 16 questionnaires

One last question : Is it ok to have same keys in different decks ? like deck 1 & deck 2 has same keys 01,02,03 ?

Basically I have the randomized texts, And now I would like to generate the questionnaire for all the texts. Sorry for the long post. Thanks

1 Answer

+1 vote

I I understand you correctly, the 3000 texts are already complete vignette combinations, not the partial elements of your textes (this was what my recent answer was based on). And you're working with a systematic sample of 300 vignettes.

Building decks is not necessary technically, but may be sensible by means of method. If you choose not working with decks, you would just draw 30 of 300 texts per interview (using a random generator question). If you choose to work with decks, you draw just one element from a list 1..30 (using a random generator as well).

Alright. Now you have a series of options how to complete that. Let's stay with the decks option: Let's say your random generator has the ID RG01 and to make it easy, you have put the text IDs (just give each an ID from 1 to 300) as content into the random generator, e.g., using a comma as separator:

1=1,2,3,4,5,6,7,8,9,...,30
2=31,32,33,34,35,...,60
etc.

You can easily prepare such a list in Excel and copy it into the random generator. And you may as well use some kind of space instead of the comma. Now value('RG01', 'label') will give you exactly that combination, which you can split into an array, using explode(). This is the first part of you PHP code:

If you want to display the question QN01 to QN30 for the 30 texts of the deck, this would be accomplished this way. Let's assume that your texts in the database for contents have the keys 'TX1' to 'TX300'.

... would be to do the assignment of texts to decks, using the keys. If you prefer that, let's say deck 1 has the codes 'D101' to 'D130', deck 2 uses the codes 'D201' to 'D230' and so on. Then the random generator does not need the combinations at all, just create a random generator with that content:

1=Deck 1
2=Deck 2
etc.

In the questionnaire, use this PHP code to display the texts from the database for contents, and the questions with the IDs as known from above: