Presentation is loading. Please wait.

Presentation is loading. Please wait.

Topic 2: An Example. Leaning Tower of Pisa Construction began in 1173 and by 1178 (2 nd floor), it began to sink Construction resumed in 1272. To compensate.

Similar presentations


Presentation on theme: "Topic 2: An Example. Leaning Tower of Pisa Construction began in 1173 and by 1178 (2 nd floor), it began to sink Construction resumed in 1272. To compensate."— Presentation transcript:

1 Topic 2: An Example

2 Leaning Tower of Pisa Construction began in 1173 and by 1178 (2 nd floor), it began to sink Construction resumed in 1272. To compensate for tilt, engineers built upper levels with one side taller Seventh floor completed in 1319 with bell tower added in 1372 Tilt continued to grow over time and was monitored. Closed in 1990. Stabilization completed in 2008 by removing ground from taller side

3 Leaning Tower of Pisa Response variable the lean (Y) –Lean in tenths of mm past 2.9 meters Explanatory variable year (X) Construct scatterplot –Can we use a line to describe relationship? Want to predict the future lean

4 SAS Data Step data a1; input year lean @@; cards; 75 642 76 644 77 656 78 667 79 673 80 688 81 696 82 698 83 713 84 717 85 725 86 742 87 757 112. ; data a1p; set a1; if lean ne.; run;

5 SAS Output Settings Version 9.3: all output is by default in HTML May prefer output in RTF or listing format to cut and paste in editor (e.g., Microsoft Word) ods html close; ods rtf file="H:\pisa.rtf"; ….SAS commands…. ods rtf close;

6 Proc Print proc print data=a1; run; Specify the data set to use Will print all variables if none are specified using var statement

7 Obsyearlean 175642 276644 377656 478667 579673 680688 781696 882698 983713 1084717 1185725 1286742 1387757 14112. The data set arranged in columns. First row provides names for variables

8 Proc Gplot symbol1 v=circle i=sm70; proc gplot data=a1p; plot lean*year; run; symbol1 v=circle i=rl; proc gplot data=a1p; plot lean*year; run; Requests a smoothed curve be added to the plot Requests the least- squares regression line be added to the plot

9 Smoothed curve

10 Regression line

11 Proc Reg proc reg data=a1; model lean=year / clb p r; output out=a2 p=pred r=resid; id year; run;

12 Parameter Estimates VariableDF Parameter Estimate Standard Errort ValuePr > |t| 95% Confidence Limits Intercept1-61.1208825.12982-2.430.0333-116.43124-5.81052 year19.318680.3099130.07<.00018.6365610.00080 Root MSE4.18097R-Square0.9880 Dependent Mean693.69231Adj R-Sq0.9869 Coeff Var0.60271

13 Output Statistics Obsyear Dependent Variable Predicted Value Std Error Mean PredictResidual Std Error Residual Student Residual -2 -1 0 1 2 Cook's D 1 75642.0000637.78022.19144.21983.5611.185 | |** | 0.266 2 76644.0000647.09891.9354-3.09893.706-0.836 | *| | 0.095 3 77656.0000656.41761.6975-0.41763.821-0.109 | | | 0.001 4 78667.0000665.73631.48631.26373.9080.323 | | | 0.008 5 79673.0000675.05491.3149-2.05493.969-0.518 | *| | 0.015 6 80688.0000684.37361.20033.62644.0050.905 | |* | 0.037 7 81696.0000693.69231.15962.30774.0170.574 | |* | 0.014 8 82698.0000703.01101.2003-5.01104.005-1.251 | **| | 0.070 9 83713.0000712.32971.31490.67033.9690.169 | | | 0.002 10 84717.0000721.64841.4863-4.64843.908-1.189 | **| | 0.102 11 85725.0000730.96701.6975-5.96703.821-1.562 | ***| | 0.241 12 86742.0000740.28571.93541.71433.7060.463 | | | 0.029 13 87757.0000749.60442.19147.39563.5612.077 | |**** | 0.817 14 112.982.57149.6771....

14 Background Reading Appendix A. –A.3 : random variables –A.4 : probability distributions Chapter 1 –1.3 : simple linear regression –1.6 : estimation of regression function –1.7 : estimation of error variance –1.8 : normal error regression model


Download ppt "Topic 2: An Example. Leaning Tower of Pisa Construction began in 1173 and by 1178 (2 nd floor), it began to sink Construction resumed in 1272. To compensate."

Similar presentations


Ads by Google