Regression

Fall 2016

MandH

Course Info

  • Syllabus
  • Lectures: T. 1310-1500, R. 1610-1700 @ SE A318
  • Instructor: Yu-Ling Tseng.      Office Hours: M. 14:10~15:10  T. 15:10~16:10  (理A409)
  • TA:  潘恩勤 分機:3521. office hour : W. 12:10-13:10@SE A413  ~  有問題要多多請教助教喔 
  • 數學小天地   ~~ 討論 各類 數學相關問題 的好地方 ~~
  • Prerequisites: Probability Theory, Statistics, Linear Algebra


  •   

    期末考將於 2017, 0103 (星期二)和 0106 (星期五)舉行

    紙筆考試時間
    0103 (星期二):    13:10 ~ 14:30 (考試教室:  理  B101 )
        同學可攜帶計算機應考

    II 上機考試時間
    0106 (星期五):   13:00 ~ 13:50  在系電腦教室考
       每組 代表應考同學 請 務 必 以USB攜帶課本的所有資料檔案來考試,
       請 提早 到電腦教室挑選要用的電腦,並將你覺得需要的檔案先放到電腦桌面,方便考試時的參考。


       上機考試:open book, open notes, open web, open anything........

       每組代表應考同學已隨 機 抽選 如下:
    101 盧柏丞  102 田兆元 103 塗怡婷 105 蔡伊婷 108 黃聖文 109 陳泓錡
    110 張容溥 111 陳勇安 112 李侑瑾 113 黃威燁 114 黃凱璿 115 黃冠穎



    1206期中考成績枝葉圖


    人數: 47

      0 | 234
      1 |
      2 | 12899
      3 | 0377889
      4 | 135578
      5 | 001233446
      6 | 023556688
      7 | 138
      8 | 057
      9 | 55

    Q1= 37.5,   Q2= 51,   Q3= 65.5
    平均:50.62      標準差: 22.18

    註:成績顏色帶代表:紅色 警告 區,黃色 小心後通行 區, 綠色 安全通行

    (就像 紅綠燈 號誌 呀)


    R Sample Programs ( in text format unless specified otherwise)  :  You will need to use R for most assignments (find and use the respective data set for each problem in the CD provided with your textbook) & you should find these sample programs quite useful.


    Data sets in txt form
    https://drive.google.com/open?id=1Q8krL5S0FC2sk1OmvV2wpEycxOR70BKx



    (date discussed in class)  Programs
    Description 

    (20160906)  SetUp(1)

    SetUp(1) shows you how to:
    1. devide graphical windows
    2. assign variables/sequences
    3. plot and make titles for the graph
    4. generate normally distributed observations/make histograms
    5. do simple regressions and related plots  (you should see the effect of sample size and s.d.  on the fitted reg. lines)
    6. quit R

    (20161020)   SetUp(2)

    ch01ta01 data
    SetUp(2) shows you how to:
    1. scan a data set in your working directory into R
    2. get figures and tables in the textbook with the Toluca Company examples
    3. construct confidence intervals for reg. coeff.'s, confidence/prediction  intervals for the mean response at given predictor x's values
    4. construt conf. band for the entire reg line,
    5. overlay three type of intervals in one plot for better comparison
    6. save the output to a file for preparing your homework, or save the R commands for later use
    7. quit R, again.
    (20161117, 1124)  MLR

    ch06fi05 data
     MLR shows you how to
    1. some basic matrix operations in R,
    2. how to obtain the design matrix after fitting a simple linear regression model,

    With the Dwaine Studios examples
    3. do multiple linear regression
    4. get figures and tables in the textbook
    5. make basic scatter plots for M-L-R data analysis
    6. obtain the design matrix
    7. get (simultaneous) conf. intervals for reg. coefficients,  confidence/prediction  intervals for the mean response at given predictors's values
    8. get 3D scatterplots
    (20161129)GLT

    ch6pr18 data
    GLT shows you how to
    1. obtain SSEs from the full model and the reduced model
    2. obtain F(1-alpha; m, k) in R
    3. use the general linear test approach  for testing certain hypotheses (by giving 3 examples)
    (20161214) ResidPlot This program ResidPlot
    1.  let you get a feeling as how a random sample of size n from N(0, 1) would look like in time sequence plots, and in histograms;
    and
    2. with simulated regression data.....  shows you some basic residual-plots for diagnostic in a regression analysis
    Please note that how a violation of certain assumptions made in reg model affect the display........
    WLSE

    ch11ta01 data
    WLSE shows you how to do W.L.S.E. when non-constant variances occurs......
    esp. shows you how to get  figures and tables in the textbook with Blood Pressure Example on p427 .
    varstabtrans

    ch3ta10 data
    This program varstabtrans illustrates a complete process when analyzing a real data set with nonconstant variance problem........
    Instead on using W.L.S.E. (which is covered in WLSE), we try transformations when nonconstant variances occur in this program.
    We run through the Case Example -- Plutonium Measurement on p 141 of textbook.
    Esp. you learn how to delete some data points from a data set, how to update model , and how to get basic diaqnostics residual plots.


      You may find useful R programs  here:
                   
    Assignments (NO LATE HOMEWORK IS ALLOWED!)                                                                                                           
    Date
    Problems
    Due date
    1227
    In R, sum((fitted.values(fm)-mean(y))^2), sum(residuals(fm)^2) give you SSR and SSE, respectively;
    where y denotes the response variable and fm is the fitted model obtained from lm(y~.....)


    Ch.10 :
    24

    Ch.11 : 6 (a~f), 7(a~f), 13, 17
    這 份作業不用交。
    但,同學 一 定  要  自 己  做過這些題目喔
    1215
    NOTE: When asked to draw a dot plot in this homework, you may draw the stem-and-leaf plot, instead. 
    In R, stem(x)
    gives you the stem-and-leaf plot of data in x.
    Ch.3 :
    3 (a, b, c, d.) (For d, only need to prepare a normal probability plot, i.e. the Q-Q plot)
             4 (a, b, c, d, e, f, h) (For e, only need to prepare a normal probability plot, i.e. the Q-Q plot)
            6 (a, b, c.) ( For c, only need the Q-Q plot)
            8 (a, b, c, d). ( Only Q-Q plot for d)
            9
    1222

    HW5sol
    感謝助教提供同學作業答案!!
    1124
    Ch.6 : 6 (c),  11 (b), 16 (b, c), 17, 19 1206 期中考,所以這作業不用交,請同學自行練習喔
    1110
    These Problems  and
    Ch.2 : 27, 28
    Ch.6 : 4, 5 (a, b), 6 (a, b), 7, 15 (c), 16 (a), 26
    1124
    1027
    Ch.6 : 2, 22, 23, 24, 25 1110
    1020
    Ch.1 : 19, 28, 45
    Ch.2 : 4, 8 (a, c), 10, 13, 23 (a, c)
    Ch.5 : 17, 18. 19
    1027
    1006
    Ch.1 : 7, 8, 33, 34, 39 (a) , 41
    Ch.2 : 3, 17.
    1013


    Computing                                                                                               

    1. R website (original, mirror @ NTU)  
    2.     R ClassRoom 
    3. Document Reader: Acrobat Reader

    Murray_0408

    Last modified: 150907
    yltseng@mail.ndhu.edu.tw