Esempio n. 1
0
 public Regression(Statistics statistics, AnovaStatistics anova, CoefficentStatistics coefficients)
 {
     this.Statistics = statistics;
     this.Anova = anova;
     this.Coefficients = coefficients;
 }
Esempio n. 2
0
        private static CoefficentStatistics ParseCoefficientStatistics(object[,] values)
        {
            CoefficentStatistics retValue = new CoefficentStatistics();

            object[,] coefficientValues = Regression.GetCoefficientValues(values);

            CoefficentStatisticRow[] rows = new CoefficentStatisticRow[]
            {
                new CoefficentStatisticRow(),
                new CoefficentStatisticRow()
            };

            int numRows = 2;
            for (int iRow = 0; iRow < numRows; iRow++)
            {
                CoefficentStatisticRow curRow = rows[iRow];

                curRow.Coefficient = Convert.ToDouble(coefficientValues[iRow, 1]);
                curRow.StandardError = Convert.ToDouble(coefficientValues[iRow, 2]);
                curRow.TStatistic = Convert.ToDouble(coefficientValues[iRow, 3]);
                curRow.PValue = Convert.ToDouble(coefficientValues[iRow, 4]);
                curRow.Lower95Pct = Convert.ToDouble(coefficientValues[iRow, 5]);
                curRow.Upper95Pct = Convert.ToDouble(coefficientValues[iRow, 6]);
            }

            retValue.Intercept = rows[0];
            retValue.XVariable = rows[1];

            return retValue;
        }