jasp-stats / jasp-issues

This repository is solely meant for reporting of bugs, feature requests and other issues in JASP.
58 stars 29 forks source link

[Feature Request]: Add regression line equation and R^2 on plot #1475

Open shun2wang opened 2 years ago

shun2wang commented 2 years ago

Description

In many cases, we need to get the regression line equation or the fitted curve equation,and R^2.

Purpose

Intuitively get the equations and R^2 in the plots.

Use-case

No response

Is your feature request related to a problem?

N/A

Describe the solution you would like

No response

Describe alternatives that you have considered

See here:https://stackoverflow.com/questions/7549694/add-regression-line-equation-and-r2-on-graph

Additional context

No response

boutinb commented 2 years ago

@vandenman Is it something you could add?

vandenman commented 2 years ago

We could add this to say, linear regression, but it's unclear to me how to make such a plot when there are more than two variables.

shun2wang commented 2 years ago

Thank you for considering adding this feature. and there some URL can help for nonlinear curve fitting expression and plots. https://www.statforbiology.com/nonlinearregression/usefulequations#curve_shapes http://sia.webpopix.org/nonlinearRegression.html

tomtomme commented 8 months ago

@shun2wang The equation can also be separate from the plot. Since this is in essence a duplicate of https://github.com/jasp-stats/INTERNAL-jasp/issues/2401 I think this one could be closed.

Or is it essential, that the formula is part of the plot? Not from my perspective since I would folllow Tuftes "minimal inc" approach.

Also the links above do not show how this would be solved for more than say four variables. You can color code the third var and do a matrix/panel plot for the fourth like flexplot does - but then the formula would need to reside above said matrix/panel of plots - which is essentially an external / separate equation again.