LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Goodness of Fit VI disagrees with Excel R^2 value

Hi,

 

I have a VI with graphing functionality of some values.

 

I want to display the formula and R2 value of the trendline. The trendline looks right and the formula pretty much exactly agrees with excel, however the R^2 value is way (compared to excel).

 

I'm not great at statistics, etc. so don't know which value is more accurate (my guess is excel). I'm guessing the discrepancy is to do with the number of points on the line that the "goodness of fit" VI is sampling, compared to perhaps a different number on Excel, but I have no idea.

 

My question: How do I get my LabView R2 to agree with the Excel R2?

 

Many thanks,

Charlie

Download All
0 Kudos
Message 1 of 3
(1,006 Views)

@charliecameron00 wrote:

Hi,

 

I have a VI with graphing functionality of some values.

 

I want to display the formula and R2 value of the trendline. The trendline looks right and the formula pretty much exactly agrees with excel, however the R^2 value is way (compared to excel).

 

I'm not great at statistics, etc. so don't know which value is more accurate (my guess is excel). I'm guessing the discrepancy is to do with the number of points on the line that the "goodness of fit" VI is sampling, compared to perhaps a different number on Excel, but I have no idea.

 

My question: How do I get my LabView R2 to agree with the Excel R2?

 

Many thanks,

Charlie


You won't get them to agree.  Frankly, Excel does not treat floating point operations exactly as IEEE 754 requires for all floating point operations (because, it is a spreadsheet and optimized for financial data.)  LabVIEW DOES implement the entire IEEE 754 standard.  Therefore, when you perform rigorous statistical analysis in Excel there is a natural difference from any calculation performed with exact adherence to IEEE 754.   


"Should be" isn't "Is" -Jay
Message 2 of 3
(956 Views)


You won't get them to agree.  Frankly, Excel does not treat floating point operations exactly as IEEE 754 requires for all floating point operations (because, it is a spreadsheet and optimized for financial data.)  LabVIEW DOES implement the entire IEEE 754 standard.  Therefore, when you perform rigorous statistical analysis in Excel there is a natural difference from any calculation performed with exact adherence to IEEE 754.   


 

That makes a lot of sense, thanks for clearing up. It annoys me how often excel cuts corners (without being clear about it) 😅

0 Kudos
Message 3 of 3
(866 Views)