en:learning:schools:s01:lecture-notes:ba-ln-04

This shows you the differences between two versions of the page.

Next revision | Previous revision | ||

en:learning:schools:s01:lecture-notes:ba-ln-04 [2015/09/22 16:22] 127.0.0.1 external edit |
en:learning:schools:s01:lecture-notes:ba-ln-04 [2017/10/30 10:15] aziegler |
||
---|---|---|---|

Line 24: | Line 24: | ||

===== Regression analysis ===== | ===== Regression analysis ===== | ||

==== Scatterplots ==== | ==== Scatterplots ==== | ||

- | <html><a href="https://www.flickr.com/photos/bisfogo/15231277763" target="_blanck" title="fc2002_prich_vs_elev by BIS-Fogo, on Flickr"><img src="https://farm8.staticflickr.com/7494/15231277763_cbfa1081de_n.jpg" width="320" height="320" alt="fc2002_prich_vs_elev"></a></html> | + | {{ :en:learning:schools:s01:lecture-notes:15231277763_cbfa1081de_n.jpg |}} |

Since linear models can only explain linear relationships and hence only make sense if such a relationship is feasible to explain the dependency between the dependent and one or more independent variables. Since eyeball analysis is very effective in estimating dependencies in the 2D space, plotting the dependent variable as a function of the independent variable should be a standard task in data analysis prior to fitting a model. | Since linear models can only explain linear relationships and hence only make sense if such a relationship is feasible to explain the dependency between the dependent and one or more independent variables. Since eyeball analysis is very effective in estimating dependencies in the 2D space, plotting the dependent variable as a function of the independent variable should be a standard task in data analysis prior to fitting a model. | ||

Line 42: | Line 42: | ||

''y = a x + b''. | ''y = a x + b''. | ||

- | <html> <a href="https://www.flickr.com/photos/bisfogo/15825103696" target="_blacnk" title="fc2002_prich_vs_elev_lm by BIS-Fogo, on Flickr"><img src="https://farm8.staticflickr.com/7552/15825103696_514791d44d_n.jpg" width="320" height="320" alt="fc2002_prich_vs_elev_lm"></a></html> | + | {{ :en:learning:schools:s01:lecture-notes:15825103696_514791d44d_n.jpg |}} |

One standard function used in R for computing linear regressions is the lm() function which allows both simple and multiple linear regression. A minimalistic call of the function looks like | One standard function used in R for computing linear regressions is the lm() function which allows both simple and multiple linear regression. A minimalistic call of the function looks like | ||

Line 80: | Line 79: | ||

8-O If you need more examples, have a look at [[en:learning:schools:s01:code-examples:ba-ce-04-01|C04-1 Linear model]] | 8-O If you need more examples, have a look at [[en:learning:schools:s01:code-examples:ba-ce-04-01|C04-1 Linear model]] | ||

- | {{section>en:resources:templates:template_messages#Note on data source Fogo natural park data 2002}} | + | {{section>en:resources:templates:template_messages#Note on data source Fogo natural park data 2007}} |

en/learning/schools/s01/lecture-notes/ba-ln-04.txt · Last modified: 2017/10/30 10:15 by aziegler

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International