void regHypToolStripMenuItem_Click(object sender, EventArgs e) { try { string[] arrName = new string[arrTranSmp.Length]; for (int i = 0; i < arrName.Length; i++) { arrName[i] = arrTranSmp[i].GetName(); } SelFactorForm sfFrom = new SelFactorForm(arrName, null); if (sfFrom.ShowDialog() != DialogResult.OK) { return; } Sample[] arrSmpX = new Sample[arrTranSmp.Length - 1]; int index = sfFrom.GetIndex(); for (int i = 0; i < index; i++) { arrSmpX[i] = arrTranSmp[i]; } for (int i = index; i < arrSmpX.Length; i++) { arrSmpX[i] = arrTranSmp[i + 1]; } Regression reg = new Regression(arrTranSmp[index], arrSmpX); reg.CheckHypothesises(alpha); string report = reg.GetHypRegrReport(); RepForm rForm = new RepForm("Проверка значимости уравнения регрессии", report); rForm.ShowDialog(); } catch { } }
void doIdentToolStripMenuItem_Click(object sender, EventArgs e) { try { string[] arrName = new string[arrTranSmp.Length]; for (int i = 0; i < arrName.Length; i++) { arrName[i] = arrTranSmp[i].GetName(); } SelFactorForm sFormY = new SelFactorForm(arrName, null); if (sFormY.ShowDialog() != DialogResult.OK) { return; } SelFactorForm sFormX = new SelFactorForm(arrName, "Выберете влияющий признак"); if (sFormX.ShowDialog() != DialogResult.OK) { return; } int indexX = sFormX.GetIndex(), indexY = sFormY.GetIndex(); IdentForm iForm = new IdentForm(arrSmp[indexX], arrSmp[indexY]); if (iForm.ShowDialog() != DialogResult.OK) { return; } arrTranSmp[indexX] = new TranSample(arrSmp[indexX], iForm.GetTransform()); lvSample.Items[indexX].SubItems[1].Text = iForm.GetTransform(); arrTranSmp[indexX].DoHistogram(useSturgess); } catch { } }
void normDistHypToolStripMenuItem_Click(object sender, EventArgs e) { try { string[] arrName = new string[arrTranSmp.Length]; for (int i = 0; i < arrName.Length; i++) { arrName[i] = arrTranSmp[i].GetName(); } SelFactorForm sfFrom = new SelFactorForm(arrName, "Выберете исследуемый признак"); if (sfFrom.ShowDialog() != DialogResult.OK) { return; } int index = sfFrom.GetIndex(); RepForm rForm = new RepForm("Проверка нормальности выборочного закона распределения", arrSmp[index].GetHypReport()); rForm.ShowDialog(); } catch { } }