Difference between revisions of "Least squares modelling (2014)"

From Statistics for Engineering
Jump to navigation Jump to search
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
__NOTOC__{{ClassSidebar
__NOTOC__{{ClassSidebarYouTube
| date = 29 January 2014 to 13 February 2014
| date = 29 January 2014 to 26 February 2014
| dates_alt_text =  
| dates_alt_text =  
| vimeoID1 = 85473848
| vimeoID1 = Ja1tJeDPUds
| vimeoID2 = 85489099
| vimeoID2 = UZz4vA49pPg
| vimeoID3 = 85777548
| vimeoID3 = pkgwO8q0Oig
| vimeoID4 = 86065752
| vimeoID4 = qeuQNS-g05w
| vimeoID5 = 86082295
| vimeoID5 = QuO4R_ynd3M
| vimeoID6 =
| vimeoID6 = 4PmKI3lOQXk
| vimeoID7 =
| vimeoID7 = AkJcGmmT2S8
| vimeoID8 =
| vimeoID8 = pVzMPZYFzGE
| course_notes_PDF = 2014-4C3-6C3-Least-squares-modelling.pdf  
| course_notes_PDF = 2014-4C3-6C3-Least-squares-modelling.pdf  
| course_notes_alt = Course slides
| course_notes_alt = Course slides
Line 27: Line 27:
| video_download_link4_MP4_size = 216 M
| video_download_link4_MP4_size = 216 M
| video_notes4 =
| video_notes4 =
| video_download_link5_MP4 = http://learnche.mcmaster.ca/media/2014-4C3-6C3-Class-05B.mp4
| video_download_link5_MP4 = http://learnche.mcmaster.ca/media/2014-4C3-6C3-Class-05C.mp4
| video_download_link5_MP4_size = 276 M  
| video_download_link5_MP4_size = 276 M  
| video_notes5 =
| video_notes5 =
| video_download_link6_MP4 =  
| video_download_link6_MP4 = http://learnche.mcmaster.ca/media/2014-4C3-6C3-Class-06A.mp4
| video_download_link6_MP4_size = M
| video_download_link6_MP4_size = 239 M
| video_notes6 =
| video_notes6 =
| video_download_link7_MP4 =  
| video_download_link7_MP4 = http://learnche.mcmaster.ca/media/2014-4C3-6C3-Class-06B.mp4
| video_download_link7_MP4_size = M
| video_download_link7_MP4_size = 259 M
| video_notes7 =
| video_notes7 =
| video_download_link8_MP4 =
| video_download_link8_MP4 = http://learnche.mcmaster.ca/media/2014-4C3-6C3-Class-07B.mp4
| video_download_link8_MP4_size = M
| video_download_link8_MP4_size = 277 M
| video_notes8 =
| video_notes8 =
}}
}}
<span style="color:#900000">{{Huge|This page is out of date.}}</span> {{Huge|Please see the [[Least_squares_modelling |latest version of these notes]].}}


== Course notes and slides ==
== Course notes and slides ==
Line 60: Line 63:
| [http://learnche.mcmaster.ca/media/2014-4C3-6C3-Class-04C.mp3 Audio] (18 M)  
| [http://learnche.mcmaster.ca/media/2014-4C3-6C3-Class-04C.mp3 Audio] (18 M)  
| None
| None
| rowspan="7"|[http://learnche.mcmaster.ca/pid/?source=Least-squares Chapter 4]
| rowspan="10"|[http://learnche.mcmaster.ca/pid/?source=Least-squares Chapter 4]
| rowspan="7"|[[Image:Nuvola_mimetypes_pdf.png|20px|link=Media:2014-4C3-6C3-Least-squares-modelling.pdf]] [[Media:2014-4C3-6C3-Least-squares-modelling.pdf|Slides for class]]  
| rowspan="10"|[[Image:Nuvola_mimetypes_pdf.png|20px|link=Media:2014-4C3-6C3-Least-squares-modelling.pdf]] [[Media:2014-4C3-6C3-Least-squares-modelling.pdf|Slides for class]]  
|-
|-
| 30 January
| 30 January
Line 84: Line 87:
| 05C
| 05C
| [http://learnche.mcmaster.ca/media/2014-4C3-6C3-Class-05C.mp4 Video] (276 M)  
| [http://learnche.mcmaster.ca/media/2014-4C3-6C3-Class-05C.mp4 Video] (276 M)  
| <!-- [http://learnche.mcmaster.ca/media/2014-4C3-6C3-Class-05C.mp3 Audio] ( M) -->
| [http://learnche.mcmaster.ca/media/2014-4C3-6C3-Class-05C.mp3 Audio] (42 M)  
| [[Media:2014-4C3-6C3-Least-squares-practice-problems.pdf|Practice problems]] (with partial solutions)
| [[Media:2014-4C3-6C3-Least-squares-practice-problems.pdf|Practice problems]] (with partial solutions)
|-
| 10 February
| 06A
| [http://learnche.mcmaster.ca/media/2014-4C3-6C3-Class-06A.mp4 Video] (239 M)
| [http://learnche.mcmaster.ca/media/2014-4C3-6C3-Class-06A.mp3 Audio] (43 M)
| None
|-
| 12 February
| 06B
| [http://learnche.mcmaster.ca/media/2014-4C3-6C3-Class-06B.mp4 Video] (259 M)
| [http://learnche.mcmaster.ca/media/2014-4C3-6C3-Class-06B.mp3 Audio] (42 M)
| None
|-
| 13 February
| NA
| None
| None
| [[Written_midterm_-_2014|Collaborative midterm]]
|-
| 24 February
| 07A
| None
| None
| style="text-align: left;" |
* [[Media:Course-evaluation-2014.pdf|Course evaluation]]
* [[Media:Multiple-linear-regression-learning-2014.pdf|Multiple linear regression exercise]]
|-
| 26 February
| 07B
| [http://learnche.mcmaster.ca/media/2014-4C3-6C3-Class-07B.mp4 Video] (277 M)
| [http://learnche.mcmaster.ca/media/2014-4C3-6C3-Class-07B.mp3 Audio] (41 M)
| None
|}
|}


Line 94: Line 129:
== Code used in class ==
== Code used in class ==


Least squares demo
Least squares demo; [http://www.r-fiddle.org/#/fiddle?id=kLmMLXev&version=1 run this code in your web-browser].
<syntaxhighlight lang="sas">
<syntaxhighlight lang="sas">
x <- c(10, 8, 13, 9, 11, 14, 6, 4, 12, 7, 5)
x <- c(10, 8, 13, 9, 11, 14, 6, 4, 12, 7, 5)

Latest revision as of 07:19, 4 January 2017

Class date(s): 29 January 2014 to 26 February 2014
Nuvola mimetypes pdf.png (PDF) Course slides








This page is out of date. Please see the latest version of these notes.


Course notes and slides

Date Class number Video and audio files Other materials Reading (PID) Slides
29 January 04C Video (119 M) Audio (18 M) None Chapter 4 Nuvola mimetypes pdf.png Slides for class
30 January 04D Video (304 M) Audio (42 M) See the source code below
03 February 05A Video (291 M) Audio (41 M) See the source code below
05 February 05B Video (216 M) Audio (42 M) None
06 February 05C Video (276 M) Audio (42 M) Practice problems (with partial solutions)
10 February 06A Video (239 M) Audio (43 M) None
12 February 06B Video (259 M) Audio (42 M) None
13 February NA None None Collaborative midterm
24 February 07A None None
26 February 07B Video (277 M) Audio (41 M) None

Software source code

Take a look at the software tutorial, particularly steps 16 to 22.

Code used in class

Least squares demo; run this code in your web-browser.

x <- c(10, 8, 13, 9, 11, 14, 6, 4, 12, 7, 5)
y <- c(8.04, 6.95, 7.58, 8.81, 8.33, 9.96, 7.24, 4.26, 10.84, 4.82, 5.68)
plot(x,y)
model.ls <- lm(y ~ x)
summary(model.ls)

coef(model.ls)
confint(model.ls)

names(model.ls)
model.ls$resisduals
resid(model.ls)

plot(x, y)
abline(model.ls)