Example #1
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;
        }
 public CoefficentStatistics(CoefficentStatisticRow intercept, CoefficentStatisticRow xVariable)
 {
     this.Intercept = intercept;
     this.XVariable = xVariable;
 }