LabVIEW

cancel
Showing results 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

Message 1 of 3
(1,024 Views)

Re: Goodness of Fit VI disagrees with Excel R^2 value

@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
(974 Views)

Re: Goodness of Fit VI disagrees with Excel R^2 value

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) 😅

Message 3 of 3
(884 Views)