help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] multivariate model output


From: Ken O'Brien
Subject: [Help-gsl] multivariate model output
Date: Mon, 22 Sep 2014 11:07:34 +0100

Hi,

I am fitting a multivariate regression using gsl. I would like to output
the model. In my univariate models, I can give a xi values and print the
corresponding y value.

Here is my current attempt to output the multivariate model. The vector
x is full of zeroes as I'm unsure how to pass multivariate parameters.
The vector y are my observations(the dependent variable). The matrix X
is my matrix of training data of dimension observations*parameters.

for (i = 0; i < observations; i++) {
         double xi = gsl_vector_get(x, i);
         double yi = gsl_vector_get(y, i);
         gsl_vector_view v = gsl_matrix_row(X, i);
         double y_err0, y_rob;
         gsl_multifit_robust_est(&v.vector, c, cov0, &y_rob, &y_err0);
         printf("%g %g %g\n", xi, yi, y_rob);
}

My question is, how do I get the xi value for each point in this
function? Currently, I am getting sensible values for yi and y_rob(the
estimate).

Best Regards,

Ken




reply via email to

[Prev in Thread] Current Thread [Next in Thread]