';
// Shranimo spremenjene nastavitve v bazo
SurveyUserSession::saveData($this->sessionData);
}
/** funkcija vrne seznam primern variabel za crostabe
*
*/
function getVariableList($witch) {
# pobrišemo array()
$this->variablesList = array();
# zloopamo skozi header in dodamo variable (potrebujemo posamezne sekvence)
foreach ($this->_HEADERS AS $skey => $spremenljivka) {
$tip = $spremenljivka['tip'];
if ($witch == 1) {
# prvi drop down, morajo biti numerične ali ordinalne
# skala - 0 Ordinalna
# skala - 1 Nominalna
$skala = isset($spremenljivka['skala']) ? $spremenljivka['skala'] : 1;
# če radio nimajo podane skale jo damo na 0
$skala = ($skala == -1 && ($tip == 6 || $tip == 16) ) ? 0 : $skala ;
$_dropdown_condition = is_numeric($tip) && ((int)$skala === 0 # ordinalna
|| $tip == 7 # number
|| $tip == 18 # vsota
|| $tip == 20) # multi number
? true : false;
} else {
#drugi dropdown
# tekstovnih in numeričnih tipov ne dodajamo
$_dropdown_condition = is_numeric($tip) && $tip != 4 #text
&& $tip != 5 #label
&& $tip != 7 #number
&& $tip != 8 #datum
&& $tip != 9 #SN-imena
&& $tip != 18 #vsota
&& $tip != 19 #multitext
&& $tip != 20 #multinumber
&& $tip != 21 #besedilo*
&& $tip != 22 #compute
&& $tip != 25 #kvota
? true : false;
}
if ($_dropdown_condition) {
$cnt_all = (int)$spremenljivka['cnt_all'];
# radio in select in checkbox
if ($cnt_all == '1' || $tip == 1 || $tip == 3 || $tip == 2) {
# pri tipu radio ali select dodamo tisto variablo ki ni polje "drugo"
if ($tip == 1 || $tip == 3 ) {
if (count($spremenljivka['grids']) == 1 ) {
# če imamo samo en grid ( lahko je več variabel zaradi polja drugo.
$grid = $spremenljivka['grids'][0];
if (count ($grid['variables']) > 0) {
foreach ($grid['variables'] AS $vid => $variable ){
if ($variable['other'] != 1) {
# imampo samo eno sekvenco grids[0]variables[0]
$this->variablesList[] = array(
'tip'=>$tip,
'spr_id'=>$skey,
'sequence'=>$spremenljivka['grids'][0]['variables'][$vid]['sequence'],
'variableNaslov'=>'('.$spremenljivka['variable'].') '.strip_tags($spremenljivka['naslov']),
'canChoose'=>true,
'sub'=>0);
}
}
}
}
} else if ($tip == 2){
if ($witch == 1) {
#pri checkboxu ponudimo vsako podvariablo posebej
$this->variablesList[] = array(
'tip'=>$tip,
'variableNaslov'=>'('.$spremenljivka['variable'].') '.strip_tags($spremenljivka['naslov']),
'canChoose'=>false,
'sub'=>0);
# imampo samo eno sekvenco grids[0]
if (count ($spremenljivka['grids'][0]['variables']) > 0) {
foreach ($spremenljivka['grids'][0]['variables'] AS $vid => $variable ){
if ($variable['other'] != 1) {
$this->variablesList[] = array(
'tip'=>$tip,
'spr_id'=>$skey,
'vr_id'=>$vid,
'sequence'=>$variable['sequence'],
'variableNaslov'=>'('.$variable['variable'].') '.strip_tags($variable['naslov']),
'canChoose'=>true,
'sub'=>1);
}
}
}
} else {
# imampo samo eno sekvenco grids[0]variables[0]
$this->variablesList[] = array(
'tip'=>$tip,
'spr_id'=>$skey,
'sequence'=>$spremenljivka['grids'][0]['variables'][0]['sequence'],
'variableNaslov'=>'('.$spremenljivka['variable'].') '.strip_tags($spremenljivka['naslov']),
'canChoose'=>true,
'sub'=>0);
}
} else {
# imampo samo eno sekvenco grids[0]variables[0]
$this->variablesList[] = array(
'tip'=>$tip,
'spr_id'=>$skey,
'sequence'=>$spremenljivka['grids'][0]['variables'][0]['sequence'],
'variableNaslov'=>'('.$spremenljivka['variable'].') '.strip_tags($spremenljivka['naslov']),
'canChoose'=>true,
'sub'=>0);
}
} else if ($cnt_all > 1){
# imamo več skupin ali podskupin, zato zlopamo skozi gride in variable
if (count($spremenljivka['grids']) > 0 ) {
$this->variablesList[] = array(
'tip'=>$tip,
'variableNaslov'=>'('.$spremenljivka['variable'].') '.strip_tags($spremenljivka['naslov']),
'canChoose'=>false,
'sub'=>0);
# ali imamo en grid, ali več (tabele
if (count($spremenljivka['grids']) == 1 ) {
# če imamo samo en grid ( lahko je več variabel zaradi polja drugo.
$grid = $spremenljivka['grids'][0];
if (count ($grid['variables']) > 0) {
foreach ($grid['variables'] AS $vid => $variable ){
if ($variable['other'] != 1) {
$this->variablesList[] = array(
'tip'=>$tip,
'spr_id'=>$skey,
'sequence'=>$variable['sequence'],
'variableNaslov'=>'('.$variable['variable'].') '.strip_tags($variable['naslov']),
'canChoose'=>true,
'sub'=>1);
}
}
}
} else if($tip == 16||$tip == 18) {
# imamo multicheckbox
foreach($spremenljivka['grids'] AS $gid => $grid) {
$sub = 0;
if ($grid['variable'] != '') {
$sub++;
$this->variablesList[] = array(
'tip'=>$tip,
'spr_id'=>$skey,
'grd_id'=>$gid,
'sequence'=>$grid['variables'][0]['sequence'],
'variableNaslov'=>'('.$grid['variable'].') '.strip_tags($grid['naslov']),
'canChoose'=>true,
'sub'=>1);
}
}
} else {
# imamo več gridov - tabele
foreach($spremenljivka['grids'] AS $gid => $grid) {
$sub = 0;
if ($grid['variable'] != '') {
$sub++;
$this->variablesList[] = array(
'tip'=>$tip,
'variableNaslov'=>'('.$grid['variable'].') '.strip_tags($grid['naslov']),
'canChoose'=>false,
'sub'=>$sub);
}
if (count ($grid['variables']) > 0) {
$sub++;
foreach ($grid['variables'] AS $vid => $variable ){
if ($variable['other'] != 1) {
$this->variablesList[] = array(
'tip'=>$tip,
'spr_id'=>$skey,
'sequence'=>$variable['sequence'],
'variableNaslov'=>'('.$variable['variable'].') '.strip_tags($variable['naslov']),
'canChoose'=>true,
'sub'=>$sub);
}
}
}
}
}
}
}
}
}
return $this->variablesList;
}
function spremenljivkaChange() {
global $lang;
if (isset($this->sessionData['ttest']['spr2']) && $this->sessionData['ttest']['spr2'] != 0){
$_spr = explode('_',$this->sessionData['ttest']['spr2']);
$spr = $this->sessionData['ttest']['spr2'];
if (isset($this->sessionData['ttest']['grid2'])){
$grid = $this->sessionData['ttest']['grid2'];
}
# poiščemo pripadajoče variable
$_spr_data = $this->_HEADERS[$this->sessionData['ttest']['spr2']];
echo ''.$lang['srv_ttest_kategories_note'].' ('.$_spr_data['variable'].') '.$_spr_data['naslov'].'';
switch ($_spr_data['tip']) {
case 1: #radio
case 3: #dropdown
case 17: #dropdown
#nardimo inpute za vse opcije
$sekvenca = $_spr_data['sequences'];
foreach ($_spr_data['options'] as $value => $option) {
echo '';
echo ' checkboxSubCondition($spr.'_'.$sekvenca.'_'.$value).'/>';
echo ' ';
echo '';
}
break;
case 2: #checkbox
#nardimo inpute za vse opcije
$option = '1';
foreach ($_spr_data['grids'][0]['variables'] as $vid => $variable) {
echo '';
echo ' checkboxSubCondition($spr.'_'.$variable['sequence'].'_'.$option).'/>';
echo ' ';
echo '';
}
break;
case 6: #mgrid
#nardimo inpute za vse opcije
$sekvenca = $this->sessionData['ttest']['seq2'];
foreach ($_spr_data['options'] as $value => $option) {
echo '';
echo ' checkboxSubCondition($spr.'_'.$sekvenca.'_'.$value).'/>';
echo ' ';
echo '';
}
break;
case 16: #mcheck
#nardimo inpute za vse opcije
# poiščemo pripadajočo sekvenco
#nardimo inpute za vse opcije
$option = '1';
foreach ($_spr_data['grids'][$grid]['variables'] as $vid => $variable) {
echo '';
echo ' checkboxSubCondition($spr.'_'.$variable['sequence'].'_'.$option).'/>';
echo ' ';
echo '';
}
break;
default:
if ((int)$_spr_data['tip'] > 0)
echo'TODO for type:'.$_spr_data['tip'];
break;
}
} else if ($this->sessionData['ttest']['spr2'] == 0){
echo $lang['srv_ttest_select1_option'].'!';
echo ' ';
}
// Shranimo spremenjene nastavitve v bazo
SurveyUserSession::saveData($this->sessionData);
}
function variableChange() {
global $admin_type;
if (count($this->sessionData['ttest']['sub_conditions']) > 1 ) {
$variables1 = $this->getSelectedVariables();
if (count($variables1) > 0) {
// ikone za izvoz
$this->displayExport();
foreach ($variables1 AS $v_first) {
// Zvezdica za vkljucitev v porocilo
$spid1 = $this->sessionData['ttest']['variabla'][0]['spr'];
$seq1 = $this->sessionData['ttest']['variabla'][0]['seq'];
$grid1 = $this->sessionData['ttest']['variabla'][0]['grd'];
$sub1 = $this->sessionData['ttest']['sub_conditions'][0];
$sub2 = $this->sessionData['ttest']['sub_conditions'][1];
$spid2 = $this->sessionData['ttest']['spr2'];
$seq2 = $this->sessionData['ttest']['seq2'];
$grid2 = $this->sessionData['ttest']['grid2'];
$spr1 = $seq2.'-'.$spid2.'-'.$grid2.'-'.$sub1.'-'.$sub2;
$spr2 = $seq1.'-'.$spid1.'-'.$grid1;
SurveyAnalysis::addCustomReportElement($type=7, $sub_type=0, $spr1, $spr2);
// Tabela
$ttest = null;
$ttest = $this->createTTest($v_first, $this->sessionData['ttest']['sub_conditions']);
$this->displayTtestTable($ttest);
// Izrisemo graf za tabelo
if(isset($this->sessionData['ttest_charts']['showChart']) && $this->sessionData['ttest_charts']['showChart'] == true){
$tableChart = new SurveyTableChart($this->sid, $this, 'ttest');
$tableChart->display();
}
}
}
}
// Shranimo spremenjene nastavitve v bazo
SurveyUserSession::saveData($this->sessionData);
}
function getSelectedVariables() {
$selected = array();
if (count($this->sessionData['ttest']['variabla']) > 0 ) {
foreach ($this->sessionData['ttest']['variabla'] AS $var1) {
if ((int)$var1['seq'] > 0) {
$selected[] = $var1;
}
}
}
// Shranimo spremenjene nastavitve v bazo
SurveyUserSession::saveData($this->sessionData);
return count($selected) > 0 ? $selected : null;
}
function createTTest($v_first, $sub_vars) {
global $site_path;
$folder = $site_path . EXPORT_FOLDER.'/';
$R_folder = $site_path . R_FOLDER.'/';
if ($this->dataFileName != '' && file_exists($this->dataFileName)) {
// Nastavimo stolpce za katere izvajamo ttest
$ttestVars = '';
$sub_conditions = array();
$i=1;
foreach ($sub_vars as $sub_condition) {
if ($i < 3) {
$_tmp = explode('_',$sub_condition);
$ttestVars .= '$'.$_tmp[2].',';
$sub_conditions[] = $_tmp[3];
$i++;
}
}
$ttestVars .= '$'.$v_first['seq'].',';
$ttestVars = substr($ttestVars, 0, -1);
// Ce se nimamo datoteke s pripravljenimi podatki jo ustvarimo
$tmp_file = $R_folder . '/TempData/crosstab_data.tmp';
if (!file_exists($tmp_file)) {
$this->prepareDataFile($ttestVars);
}
// Inicializiramo R in pozenemo skripto za crosstabulacije
$R = new SurveyAnalysisR($this->sid);
$result = $R->createTTest($sub_conditions);
// Na koncu pobrisemo zacasen file s podatki
$this->deleteDataFile();
}
// Shranimo spremenjene nastavitve v bazo
SurveyUserSession::saveData($this->sessionData);
return $result;
}
function createTTestOld($v_first, $sub_vars) {
global $site_path;
$folder = $site_path . EXPORT_FOLDER.'/';
if ($this->dataFileName != '' && file_exists($this->dataFileName)) {
$spr1 = $this->_HEADERS[$v_first['spr']];
$grid1 = $spr1['grids'][$v_first['grd']];
$sequence1 = $v_first['seq'];
# za checkboxe gledamo samo odgovore ki so bili 1 in za vse opcije
$sekvences1 = array();
$spr_1_checkbox = false;
if ($spr1['tip'] == 2 || $spr1['tip'] == 16) {
$spr_1_checkbox = true;
if (isset($sequence1) && (int)$sequence1 > 0) {
$sekvences1[] = (int)$sequence1;
} else {
if ($spr1['tip'] == 2) {
$sekvences1 = explode('_',$spr1['sequences']);
}
if ($spr1['tip'] == 16) {
foreach ($grid1['variables'] AS $_variables) {
$sekvences1[] = $_variables['sequence'];
}
}
}
} else {
$sekvences1[] = $sequence1;
}
# pogoji so že dodani v _CURRENT_STATUS_FILTER
# dodamo filter za loop-e
if (isset($this->_CURRENT_LOOP['filter']) && $this->_CURRENT_LOOP['filter'] != '') {
$status_filter = $this->_CURRENT_STATUS_FILTER.' && '.$this->_CURRENT_LOOP['filter'];
} else {
$status_filter = $this->_CURRENT_STATUS_FILTER;
}
# nastavimo subfiltre za drugo variablo
$sub_conditions = array();
$i=1;
foreach ($sub_vars as $sub_condition) {
if ($i < 3) {
$_tmp = explode('_',$sub_condition);
$sub_conditions[$i] = ' && ($'.$_tmp[2].' == '.$_tmp[3].')';
$i++;
}
}
# dodamo status filter za vse sekvence checkbox-a da so == 1
if ($additional_status_filter != null) {
$status_filter .= $additional_status_filter;
}
# odstranimo vse zapise, kjer katerakoli od variabel vsebuje missing
$_allMissing_answers = SurveyMissingValues::GetMissingValuesForSurvey(array(1,2,3));
$_pageMissing_answers = $this->getInvalidAnswers (MISSING_TYPE_CROSSTAB);
# polovimo obe sequenci
$tmp_file = $folder . 'tmp_ttest_'.$this->sid.'.TMP';
$file_handler = fopen($tmp_file,"w");
fwrite($file_handler,"0){
foreach ($sekvences1 AS $sequence1) {
if (count($sub_conditions) > 1) {
foreach ($sub_conditions as $subkey =>$sub_condition) {
#skreira variable: $ttest, $cvar1, $cvar2
$additional_filter = '';
if ($spr_1_checkbox == true) {
$_seq_1_text = ''.$sequence1;
# pri checkboxih gledamo samo kjer je 1 ( ne more bit missing)
$additional_filter = ' && ($'.$sequence1.' == 1)';
} else {
$_seq_1_text = '$'.$sequence1;
# dodamo še pogoj za missinge
foreach ($_pageMissing_answers AS $m_key1 => $missing1) {
#$additional_filter .= ' && ($'.$sequence1.' != '.$m_key1.')';
}
}
if (IS_WINDOWS) {
$command1 = 'awk -F"|" "BEGIN {{OFS=\"\"} {ORS=\"\n\"}} '.$status_filter.$sub_condition.$additional_filter.' { print \"$ttest[\x27\",'.$subkey.',\"\x27][\x27\",'.$_seq_1_text.',\"\x27]++;\"}" '.$this->dataFileName.' >> '.$tmp_file;
} else {
$command1 = 'awk -F"|" \'BEGIN {{OFS=""} {ORS="\n"}} '.$status_filter.$sub_condition.$additional_filter.' { print "$ttest[\x27\",'.$subkey.',\"\x27][\x27",'.$_seq_1_text.',"\x27]++;"}\' '.$this->dataFileName.' >> '.$tmp_file;
}
$out = shell_exec($command1);
}
}
}
}
$file_handler = fopen($tmp_file,"a");
fwrite($file_handler,'?>');
fclose($file_handler);
include($tmp_file);
if (file_exists($tmp_file)) {
unlink($tmp_file);
}
# naredimo izračune
#najprej izračunamo frekvenco in povprečje
# zloopamo preko posamezneka pod pogoja
$result = array();
$cnt = 0;
if (count($ttest) > 0) {
foreach ($ttest AS $subkey => $_ttests) {
$cnt++;
# zloopamo preko frekvenc in nardimo izračune
$sum_all = 0;
$n = 0;
if(count($_ttests) > 0) {
foreach ($_ttests AS $value => $freq) {
#$n = bcadd($n,$freq,BC_PRECISION);
#$sum_all = bcadd($sum_all,bcmul($value,$freq,BC_PRECISION),BC_PRECISION);
$n += $freq;
$sum_all += $value * $freq;
}
}
#n = frekvenca
#$x = ($n <> 0)
# ? bcdiv($sum_all,$n,BC_PRECISION)
# : 0;
$x = ($n <> 0)
? $sum_all / $n
: 0;
$result[$cnt] = array('n'=>$n, 'x'=>$x);
# izračunamo še standardno diviacijo
$sum_pow_xi_fi_avg = 0;
if(count($_ttests) > 0) {
foreach ($_ttests AS $value => $freq) {
$xi = $value;
$fi = $freq;
#$sum_pow_xi_fi_avg += pow(($xi - $avg),2) * $fi;
#$sum_pow_xi_fi_avg = bcadd($sum_pow_xi_fi_avg, bcmul(bcpow(bcsub($xi,$x,BC_PRECISION),2,BC_PRECISION),$fi,BC_PRECISION));
$sum_pow_xi_fi_avg += pow( ($xi - $x), 2 ) * $fi ;
}
}
#varianca
#$s2 = (($n - 1) > 0) ? sqrt($sum_pow_xi_fi_avg / ($n -1)) : 0;
#$s2 = (bcsub($n, 1, BC_PRECISION) <> 0)
# ? bcsqrt( bcdiv($sum_pow_xi_fi_avg, bcsub($n, 1, BC_PRECISION), BC_PRECISION), BC_PRECISION)
# : 0;
$s2 = ( $n - 1 <> 0 )
? sqrt( $sum_pow_xi_fi_avg / ($n - 1) )
: 0;
$result[$cnt]['s2'] = $s2;
# standardna napaka
#se = s2 / sqrt(n)
#$se = $n > 0
# ? bcdiv($s2, bcsqrt($n, BC_PRECISION), BC_PRECISION)
# : 0;
$se = $n > 0
? $s2 / sqrt($n)
: 0;
$result[$cnt]['se'] = $se;
#se2 = *se^2
#$se2 = bcpow($se, 2, BC_PRECISION);
$se2 = pow($se, 2);
$result[$cnt]['se2'] = $se2;
#margini => 1,96*ee
#$margin = bcmul(1.96, $se, BC_PRECISION);
$margin = 1.96 * $se;
$result[$cnt]['margin'] = $margin;
}
}
#razlika povprečij => $d = x1 -x2
#$d = bcsub($result[1]['x'], $result[2]['x'], BC_PRECISION);
$d = $result[1]['x'] - $result[2]['x'];
$result['d'] = $d;
#sed : std. error difference
#$sed = bcsqrt( bcadd($result[1]['se2'], $result[2]['se2'], BC_PRECISION), BC_PRECISION );
$sed = sqrt( $result[1]['se2'] + $result[2]['se2']);
$result['sed'] = $sed;
#ttest => t = d / sed
#$t = ($sed <> 0)
# ? bcdiv($d, $sed, BC_PRECISION)
# : 0;
$t = ($sed <> 0)
? $d / $sed
: 0;
$result['t'] = $t;
}
// Shranimo spremenjene nastavitve v bazo
SurveyUserSession::saveData($this->sessionData);
return $result;
}
// Pripravimo file iz katerega preberemo podatke in izvedemo ttest
function prepareDataFile($cols){
global $site_path;
$folder = $site_path . EXPORT_FOLDER.'/';
$R_folder = $site_path . R_FOLDER.'/';
if (isset($this->_CURRENT_LOOP['filter']) && $this->_CURRENT_LOOP['filter'] != '') {
$status_filter = $this->_CURRENT_STATUS_FILTER.' && '.$this->_CURRENT_LOOP['filter'];
} else {
$status_filter = $this->_CURRENT_STATUS_FILTER;
}
# dodamo status filter za vse sekvence checkbox-a da so == 1
if ($additional_status_filter != null) {
$status_filter .= $additional_status_filter;
}
# odstranimo vse zapise, kjer katerakoli od variabel vsebuje missing
$_allMissing_answers = SurveyMissingValues::GetMissingValuesForSurvey(array(1,2,3));
$_pageMissing_answers = $this->getInvalidAnswers(MISSING_TYPE_CROSSTAB);
// File kamor zapisemo filtrirane podatke
$tmp_file = $R_folder . '/TempData/ttest_data.tmp';
// Filtriramo podatke po statusu in loopih in jih zapisemo v temp folder R-ja
if (IS_WINDOWS) {
$command = 'awk -F"|" "BEGIN {{OFS=\",\"} {ORS=\"\n\"}} '.$status_filter.' { print '.$cols.' }" '.$this->dataFileName.' >> '.$tmp_file;
} else {
$command = 'awk -F"|" \'BEGIN {{OFS=","} {ORS="\n"}} '.$status_filter.' { print '.$cols.'; }\' '.$this->dataFileName.' >> '.$tmp_file;
}
$out = shell_exec($command);
return $out;
}
// Pobrisemo zacasen file s podatki
function deleteDataFile(){
global $site_path;
$R_folder = $site_path . R_FOLDER.'/';
$tmp_file = $R_folder . '/TempData/ttest_data.tmp';
// Na koncu pobrisemo zacasen file s podatki
if (file_exists($tmp_file)) {
unlink($tmp_file);
}
}
/** Sestavi array nepravilnih odgovorov
*
*/
function getInvalidAnswers($type) {
$result = array();
$missingValuesForAnalysis = SurveyMissingProfiles :: GetMissingValuesForAnalysis($type);
foreach ($missingValuesForAnalysis AS $k => $answer) {
$result[$k] = array('text'=>$answer,'cnt'=>0);
}
return $result;
}
function displayTtestTable($ttest) {
global $lang;
# preverimo ali imamo izbrano odvisno spremenljivko
$spid1 = $this->sessionData['ttest']['variabla'][0]['spr'];
$seq1 = $this->sessionData['ttest']['variabla'][0]['seq'];
$grid1 = $this->sessionData['ttest']['variabla'][0]['grd'];
if (is_array($ttest) && count($ttest) > 0 && (int)$seq1 > 0) {
if ($this->isArchive == false) {
echo '
';
# če ne uporabljamo privzetega časovnega profila izpišemo opozorilo
SurveyTimeProfiles :: printIsDefaultProfile();
# če imamo filter ifov ga izpišemo
SurveyConditionProfiles:: getConditionString($doNewLine );
# če imamo filter spremenljivk ga izpišemo
SurveyVariablesProfiles:: getProfileString($doNewLine, true);
SurveyDataSettingProfiles :: getVariableTypeNote($doNewLine );
# če rekodiranje
$SR = new SurveyRecoding($this->sid);
$SR -> getProfileString();
echo '
';
}
$spr_data_1 = $this->_HEADERS[$spid1];
if ($grid1 == 'undefined') {
# imamp lahko več variabel
$seq = $seq1;
foreach ($spr_data_1['grids'] as $gkey => $grid ) {
foreach ($grid['variables'] as $vkey => $variable) {
$sequence = $variable['sequence'];
if ($sequence == $seq) {
$sprLabel1 = '('.$variable['variable'].') '. $variable['naslov'];
}
}
}
}
else {
# imamo subgrid
$sprLabel1 = '('.$spr_data_1['grids'][$grid1]['variable'].') '. $spr_data_1['grids'][$grid1]['naslov'];
}
# polovio labele
$spid2 = $this->sessionData['ttest']['spr2'];
$sprLabel2 = trim($this->sessionData['ttest']['label2']);
$label1 = $this->getVariableLabels($this->sessionData['ttest']['sub_conditions'][0]);
$label2 = $this->getVariableLabels($this->sessionData['ttest']['sub_conditions'][1]);
echo '