The most feedback I got from version one was the need for the "coefficient of determination" or the "r2 "value. After some trial and error I came up with a solution that I think will work just fine. What happens is when you create a graph now you have the option to run a "linear regression analysis". When this option is selected, an analysis is done and the results are placed on a hidden sheet called "STATS" and the important parts of the analysis (namely the slope, y-intercept and coefficient of determination) are then added to another sheet called "mbr^2". If you unhide the "STATS" sheet you might want to look at "Google Sheets Linear Regression Info" to get an understanding of what all the numbers represent.
The stats and the data are connected. So if you change your data the "STATS"and "mbr^2" sheets are updated appropriately.
Here are the basics steps to use Version 2:
The stats and the data are connected. So if you change your data the "STATS"and "mbr^2" sheets are updated appropriately.
Here are the basics steps to use Version 2:
- Click the link, save a copy,
- Go to "Tools - Script Editor" and run either "On install" or "On open". This will add a menu command on your "Add ons" menu.
- Click "Create Graph" and follow the instruction in the sidebar!
Please let me know what you think! I am working on how to add more trendline options such as power and exponential.
List of links:
The spreadsheet: Trendline Addon Ver2
The original post: Adding a Trendline to a Google Sheets Chart