Quantcast

Linear regression and R-squared

classic Classic list List threaded Threaded
4 messages Options
XMMS2010 XMMS2010
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Linear regression and R-squared

Hi,

using "reglin" or "regress" a linear regression of measurement data can be done. But how is it possible to get R-squared of the regression as a parameter for the "goodness of fit"? Is there another function for doing this?

Thanks

XMMS2010
  

WEB.DE DSL Doppel-Flat ab 19,99 €/mtl.! Jetzt auch mit    
gratis Notebook-Flat! http://produkte.web.de/go/DSL_Doppel_Flatrate/2
Paul Carrico Paul Carrico
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Linear regression and R-squared

Hi

 

I do as follow … but maybe there’s another way !

 

                F_mean = mean(experience(:,2));

 

                SSE = 0;

                SST = 0;

                SSE = norm ((F_fit(:,2) - experience(:,2))^2) ;     ……. you can use sum instead of norm

                SST = norm((F_mean - experience(:,2))^2) ;

 

                R_square = 1 - (SSE / SST);

 

Where “experience” are the experimental data / F_fit are the results from you’re

 

Paul

 

 

De : [hidden email] [mailto:[hidden email]]
Envoyé : lundi 6 décembre 2010 21:20
À : [hidden email]
Objet : [scilab-Users] Linear regression and R-squared

 

Hi,

using "reglin" or "regress" a linear regression of measurement data can be done. But how is it possible to get R-squared of the regression as a parameter for the "goodness of fit"? Is there another function for doing this?

Thanks

XMMS2010

  

WEB.DE DSL Doppel-Flat ab 19,99 €/mtl.! Jetzt auch mit    
gratis Notebook-Flat! http://produkte.web.de/go/DSL_Doppel_Flatrate/2

 

Samuel GOUGEON-3 Samuel GOUGEON-3
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Linear regression and R-squared

In reply to this post by XMMS2010
----- Message d'origine -----
De : [hidden email]
Date : 06/12/2010 21:19:
Hi,

using "reglin" or "regress" a linear regression of measurement data can be done. But how is it possible to get R-squared of the regression as a parameter for the "goodness of fit"? Is there another function for doing this?
The RMS deviations between data and the fit are given on the diagonal of the third
output argument of reglin(). For instance.

Regards
Samuel

Eric Dubois Eric Dubois
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Linear regression and R-squared

In reply to this post by XMMS2010
Hi.

R square and many other statistics are available in Grocer, the econometric toolbox available at http://dubois.ensae.net/grocer.html or through the module manager Atoms.

Éric.

2010/12/6 <[hidden email]>
Hi,

using "reglin" or "regress" a linear regression of measurement data can be done. But how is it possible to get R-squared of the regression as a parameter for the "goodness of fit"? Is there another function for doing this?

Thanks

XMMS2010
  

WEB.DE DSL Doppel-Flat ab 19,99 €/mtl.! Jetzt auch mit    
gratis Notebook-Flat! http://produkte.web.de/go/DSL_Doppel_Flatrate/2

Loading...