[Scilab-users] Problem with reglin function

classic Classic list List threaded Threaded
3 messages Options
csoulard csoulard
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] Problem with reglin function

Hello,

I am trying to perform a linear regression using the reglin function and I
am facing a problem. See below the code I am trying to run :

Data_Zeta = [
    4.4142e+04 6.5750e+01
    4.6287e+04 7.0186e+01
    5.4734e+04 6.0947e+01
    1.4098e+05 5.9598e+01
    1.5908e+05 6.0502e+01
    1.6466e+05 4.2313e+01
    2.4231e+05 4.0173e+01
    2.8891e+05 4.0598e+01
    4.6669e+05 3.2083e+01
    5.8211e+05 3.2542e+01
]; // The dataset to perform the regression

plot(Data_Zeta(:,1),Data_Zeta(:,2),'bo') // Optional line to plot the
dataset

[a,b,sig] = reglin(Data_Zeta(:,1),Data_Zeta(:,2)); // Call of the reglin
function

I am getting the following error message in the console : ATTENTION : armax
: z*z' est numériquement singulier.

Which can be translated as : WARNING : armax : z * z' is numerically
singular

Then I am getting variables a and sig as 10x10 matrices filled with zeros,
and b a 10x1 vector identical to Data_Zeta(:,2).

Do you know what I am doing wrong ?

Thank you for your feedback.



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Rafael Guerra Rafael Guerra
Reply | Threaded
Open this post in threaded view
|

Re: Problem with reglin function

Transpose X and Y vectors:

[a,b,sig] = reglin(Data_Zeta(:,1)',Data_Zeta(:,2)'); // Call of the reglin function
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
csoulard csoulard
Reply | Threaded
Open this post in threaded view
|

Re: Problem with reglin function

That worked, thanks for your help !

Indeed, it is mentioned in the help of the reglin function that x and y
should be of size (p,n) and (q,n) respectively, with n being the number of
samples, but I missed that part.



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users