0 votes
in SoSci Survey (English) by SoSci Survey (281k points)

I will give a scenario which I have right now:

  1. I generate a Vignette Universe from multiple dimensions and levels. Say for example 3000 texts
  2. Then from these 3000 texts I am picking randomly around say 300 texts
  3. Later I am generating decks say around 10 decks, so each deck has 300/10 = 30 texts, which again i am randomly assigning.
  4. 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,

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

    Question 1(EmployeeInfo Deck1)

    Question 2(StudentInfo Deck1)
    Answer 2

  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
by SoSci Survey (281k points)

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:


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 (!isset($com)) {
  $val = value('RG01', 'label');
  $com = explore(',', $val);

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'.

$i = loopPage(count($com));
$qID = 'QN'.sprintf('%02d', $i + 1);
$textID = 'TX'.($i + 1);
// Display question and text
$data = dbGet($textID);
$text = $data[0];

Another optinon...

... 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

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:

$deck = value('RG01');
$i = loopPage(30);
$textID = 'D'.$deck.sprintf('%02d', $i + 1);
$qID = 'QN'.sprintf('%02d', $i + 1);
// Display question and text - like before
$data = dbGet($textID);
$text = $data[0];

Should you be interested in the solution without decks, feel free to ask a new question :)

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen

Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question