10-06-2022 06:17 AM
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
10-06-2022 12:22 PM
@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.
10-07-2022 03:28 AM - edited 10-07-2022 03:31 AM
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) 😅