I'm experimenting with OLSMultipleLinearRegression and I wonder which of my parameters has most impact on the prediction. I do not understand which method in OLSMultipleLinearRegression that will return that information.
static void test() {
double y[] = {110, 120, 135, 140};
double data[][] = {
{9, 100},
{21, 260},
{29, 490},
{41, 650}
};
OLSMultipleLinearRegression regression = new OLSMultipleLinearRegression();
regression.newSampleData(y, data);
double[] beta = regression.estimateRegressionParameters();
for(int i = 0;i<beta.length;i++) {
System.out.printf("b%d = %.3f\n",i, beta[i]);
}
int ROW = 3;
double value = y[ROW];
double predict = beta[0] + beta[1] * data[ROW][0] + beta[2] * data[ROW][1];
System.out.printf("y=%.3f + %.3f * %.3f + %.3f * %.3f\n", beta[0],beta[1],data[ROW][0],beta[2],data[ROW][1]);
System.out.printf("predict=%.3f value=%.3f\n", predict, value );
}