0 votes
in SoSci Survey (dt.) by s272143 (120 points)
edited by SoSci Survey

Hallo,
Ausgangslage: wir haben zwei Unternehmen und vier Teams (in jeweils 3 Ausprägungen).
Über eine Randomisierung wollen wir erreichen, dass nie das gleiche Team zwei mal ein Unternehmen vorstellt.
Die Reihenfolge der Pitches ist ebenfalls randomisiert. Das sind unsere Codes:

Randomisierung Reihenfolge:

$pages = [];

if (value('RD04') == 01) {
    // Wenn RD04 gleich 1 ist, setzen Sie die Reihenfolge auf 07, 08, 09
    $pages = ['pitch1', 'pitch2', 'mon', 'control'];
} elseif (value('RD04') == 02) {
    // Wenn RD04 gleich 2 ist, setzen Sie die Reihenfolge auf 08, 07, 09
    $pages = ['pitch2', 'pitch1', 'mon', 'control'];
}

// Anwenden der festgelegten Seitenreihenfolge, wenn $pages nicht leer ist
if (!empty($pages)) {
    setPageOrder($pages, 'control');
}

Randomisierung Unternehmen 1:

$rd02_options = range(01, 12);

if (in_array(value('RD03'), [01, 02, 03])) {
    $rd02_options = range(04, 12);
} elseif (in_array(value('RD03'), [04, 05, 06])) {
    $rd02_options = array_merge(range(01, 03), range(07, 12));
} elseif (in_array(value('RD03'), [07, 08, 09])) {
    $rd02_options = array_merge(range(01, 06), range(10, 12));
} elseif (in_array(value('RD03'), [10, 11, 12])) {
    $rd02_options = range(01, 09);
}
$rd02_value = $rd02_options[array_rand($rd02_options)];

if (value('RD02') == 01) {
  question('VI02');
} elseif (value('RD02') == 02) {
  question('VI10');
} elseif (value('RD02') == 03) {
  question('VI11');
} elseif (value('RD02') == 04) {
  question('VI05');
} elseif (value('RD02') == 05) {
  question('VI12');
} elseif (value('RD02') == 06) {
  question('VI13');
} elseif (value('RD02') == 07) {
  question('VI06');
} elseif (value('RD02') == 08) {
  question('VI14');
} elseif (value('RD02') == 09) {
  question('VI15');
} elseif (value('RD02') == 10) {
  question('VI07');
} elseif (value('RD02') == 11) {
  question('VI16');
} elseif (value('RD02') == 12) {
  question('VI17');
}

Randomisierung Unternehmen 2:

$rd03_options = range(01, 12);

if (in_array(value('RD02'), [01, 02, 03])) {
    $rd03_options = range(04, 12);
} elseif (in_array(value('RD02'), [04, 05, 06])) {
    $rd03_options = array_merge(range(01, 03), range(07, 12));
} elseif (in_array(value('RD02'), [07, 08, 09])) {
    $rd03_options = array_merge(range(01, 06), range(10, 12));
} elseif (in_array(value('RD02'), [10, 11, 12])) {
    $rd03_options = range(01, 09);
}
$rd03_value = $rd03_options[array_rand($rd03_options)];

if (value('RD03') == 01) {
  question('VI01');
} elseif (value('RD03') == 02) {
  question('VI19');
} elseif (value('RD03') == 03) {
  question('VI18');
} elseif (value('RD03') == 04) {
  question('VI08');
} elseif (value('RD03') == 05) {
  question('VI20');
} elseif (value('RD03') == 06) {
  question('VI21');
} elseif (value('RD03') == 07) {
  question('VI03');
} elseif (value('RD03') == 08) {
  question('VI22');
} elseif (value('RD03') == 09) {
  question('VI23');
} elseif (value('RD03') == 10) {
  question('VI04');
} elseif (value('RD03') == 11) {
  question('VI24');
} elseif (value('RD03') == 12) {
  question('VI25');
}

Leider zeigt es uns dennoch ab und an zwei mal das gleiche Team hintereinander an. An was kann das liegen?

1 Answer

0 votes
by SoSci Survey (305k points)

Über eine Randomisierung wollen wir erreichen, dass nie das gleiche Team zwei mal ein Unternehmen vorstellt.

Ich würde vorschlagen, dass Sie einen Zufallsgenertor erstellen, welcher 4 Codes (für die 4 Teams) enthält, und pro Interview 2 Codes zieht.

Die erste Ziehung verwenden Sie dann in Durchlauf 1, die zweite Ziehung für das Unternehmen 2.

Löst das Ihr Problem? Wenn nicht, dann würde ich Sie bitten, die Problemstellung noch weiter auszuführen.

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

...