Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/denissimon/linear-regression
Linear regression implementation in R.
https://github.com/denissimon/linear-regression
correlation linear-regression plot prediction r regression
Last synced: 2 months ago
JSON representation
Linear regression implementation in R.
- Host: GitHub
- URL: https://github.com/denissimon/linear-regression
- Owner: denissimon
- License: mit
- Created: 2015-04-20T22:52:04.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-04-11T12:24:50.000Z (almost 9 years ago)
- Last Synced: 2023-02-26T23:23:01.748Z (almost 2 years ago)
- Topics: correlation, linear-regression, plot, prediction, r, regression
- Language: R
- Homepage:
- Size: 44.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Linear Regression
=================Linear regression implementation in R (for university course).
##### The initial data
|X (key)|Y (value)|
|-------|-------|
|1|2
|2|2
|3|5
|4|4
|5|5
|6|6
|7|6|We'll first enter the given data in R and create a scatter plot for it. Then we'll craft for our plot the "line of best fit", or the "least squares regression line".
![plot](./img/plot.png)
After that, we'll define the "Pearson's correlation coefficient", commonly called "the correlation coefficient".
![correlation](./img/correlation.png)
The correlation coefficient 0.9053 satisfies the condition -1 <= Rxy <= 1, and indicates a quite strong degree of linear dependence between the given variables.
Finally, we'll predict the value for key = 8.
![plot1](./img/plot1.png)