public void SetData(SeriesVariable dependentVariable, SeriesVariables independentVariables, LinearRegressionAnalysisForm.LRSpecification lrProperties) { this.dependentVariable = dependentVariable; this.independentVariables = independentVariables; this.lrProperties = lrProperties; this.update(); }
public void SetData(SeriesData data, SeriesVariable dependentVariable, SeriesVariables independentVariables, LinearRegressionAnalysisForm.LRSpecification lrProperties, LinearRegressionAnalysisForm.LRComponent lrTable, double[,] testValues, string[] forcastedTime, double[] forcastedData) { this.data = data; this.dependentVariable = dependentVariable; this.independentVariables = independentVariables; this.lrProperties = lrProperties; this.lrTable = lrTable; this.testValues = testValues; this.time = forcastedTime; this.forcasted = forcastedData; }
public void LinearRegression() { LinearRegressionAnalysisForm dlg = new LinearRegressionAnalysisForm(this.data); if (dlg.ShowDialog() == DialogResult.OK) { int k = 1; foreach (FATabStripItem tabPage in this.tabControlResult.Items) { if (tabPage.Title.StartsWith("Regression Analysis")) k++; } if (dlg.IsStorePredicted) { SeriesVariable var = new SeriesVariable(dlg.PredictedName, "Predicted Value of Linear Regression Analysis of 'Model " + k.ToString()); var.InitializeItem(dlg.LRTable.Predicted.Length); for (int i = 0; i < dlg.LRTable.Predicted.Length; i++) var[i] = dlg.LRTable.Predicted[i]; this.data.SeriesVariables.Add(var); this.seriesDataList.Refresh(); } if (dlg.IsStoreResidual) { SeriesVariable var = new SeriesVariable(dlg.ResidualName, "Residual Value of Linear Regression Analysis of 'Model " + k.ToString()); var.InitializeItem(dlg.LRTable.Residual.Length); for (int i = 0; i < dlg.LRTable.Residual.Length; i++) var[i] = dlg.LRTable.Residual[i]; this.data.SeriesVariables.Add(var); this.seriesDataList.Refresh(); } LRResultTabPage lRTabPage = new LRResultTabPage(); lRTabPage.SetData(this.data, dlg.DependentVariable, dlg.IndependentVariables, dlg.LRProperties, dlg.LRTable, dlg.TestValues, dlg.ForcastedTime, dlg.ForcastedData); lRTabPage.IsAnovaTableVisible = dlg.IsAnovaTableChecked; lRTabPage.IsCoefficientTableVisible = dlg.IsCoefficientTableChecked; lRTabPage.IsDurbinWatsonVisible = dlg.IsDurbinWatsonChecked; lRTabPage.IsConfidenceIntervalForParametersVisible = dlg.IsConfidenceIntervalForParametersChecked; lRTabPage.IsVIFForPredictorsVisible = dlg.IsVIFForPredictorsChecked; lRTabPage.IsPartialCorrelationVisible = dlg.IsPartialCorrelationCecked; lRTabPage.IsDataTableVisible = dlg.IsDataTableChecked; lRTabPage.IsForcastedTableVisible = dlg.IsForcastedTableChecked; lRTabPage.IsResidualVsPredictedGraphVisible = dlg.IsResidualVsPredictedGraphChecked; lRTabPage.IsResidualGraphVisible = dlg.IsResidualGraphChecked; lRTabPage.IsNormalProbabilityPlotVisible = dlg.IsNormalProbabilityPlotChecked; lRTabPage.DrawControl(); lRTabPage.Title = "Regression Analysis : 'Model " + k.ToString() + "'"; lRTabPage.IsDrawn = true; this.tabControlResult.AddTab(lRTabPage); this.tabControlResult.SelectedItem = lRTabPage; this.tabControlData.SelectedTab = this.tabPageResult; } }
public void SetData(LinearRegressionAnalysisForm.LRSpecification lrProperties) { this.lrProperties = lrProperties; this.update(); }