Uji Kelinearan dan Keberartian Regresi Pertemuan 02 Matakuliah : I0174 – Analisis Regresi Tahun : Ganjil 2007/2008
Dec 14, 2015
Uji Kelinearan dan Keberartian Regresi
Pertemuan 02
Matakuliah : I0174 – Analisis RegresiTahun : Ganjil 2007/2008
Bina Nusantara
Uji Kelinieran dan Keberartian Regresi
• Anova pada regresi Sederhana
• Selang Kepercayaan Parameter Regresi
• Uji Independen Antar Peubah
Bina Nusantara
Measures of Variation: The Sum of Squares
SST = SSR + SSE
Total Sample
Variability
= Explained Variability
+ Unexplained Variability
Bina Nusantara
Measures of Variation: The Sum of Squares
• SST = Total Sum of Squares – Measures the variation of the Yi values around their
mean,
• SSR = Regression Sum of Squares – Explained variation attributable to the relationship
between X and Y
• SSE = Error Sum of Squares – Variation attributable to factors other than the
relationship between X and Y
(continued)
Y
Bina Nusantara
Measures of Variation: The Sum of Squares
(continued)
Xi
Y
X
Y
SST = (Yi - Y)2
SSE =(Yi - Yi )2
SSR = (Yi - Y)2
_
_
_
Bina Nusantara
Venn Diagrams and Explanatory Power of Regression
Sales
Sizes
Variations in Sales explained by Sizes or variations in Sizes used in explaining variation in Sales
Variations in Sales explained by the error term or unexplained by Sizes
Variations in store Sizes not used in explaining variation in Sales
SSE
SSR
Bina Nusantara
The ANOVA Table in Excel
ANOVA
df SS MS FSignificance F
Regression
kSSR
MSR=SSR/k
MSR/MSEP-value of the F Test
Residuals
n-k-1
SSE
MSE=SSE/(n-k-1)
Total n-1SST
Bina Nusantara
Measures of VariationThe Sum of Squares: Example
ANOVA
df SS MS F Significance F
Regression 1 30380456.12 30380456 81.17909 0.000281201
Residual 5 1871199.595 374239.92
Total 6 32251655.71
Excel Output for Produce Stores
SSR
SSERegression (explained) df
Degrees of freedom
Error (residual) df
Total df
SST
Bina Nusantara
The Coefficient of Determination
•
• Measures the proportion of variation in Y that is explained by the independent variable X in the regression model
2 Regression Sum of Squares
Total Sum of Squares
SSRr
SST
Bina Nusantara
Venn Diagrams and Explanatory Power of Regression
Sales
Sizes
2
SSR
SSR S
r
SE
Bina Nusantara
Coefficients of Determination (r 2) and Correlation (r)
r2 = 1, r2 = 1,
r2 = .81, r2 = 0,Y
Yi = b0 + b1Xi
X
^
YYi = b0 + b1Xi
X
^Y
Yi = b0 + b1Xi
X
^
Y
Yi = b0 + b1Xi
X
^
r = +1 r = -1
r = +0.9 r = 0
Bina Nusantara
Standard Error of Estimate
•
• Measures the standard deviation (variation) of the Y values around the regression equation
2
1
ˆ
2 2
n
ii
YX
Y YSSE
Sn n
Bina Nusantara
Measures of Variation: Produce Store Example
Regression StatisticsMultiple R 0.9705572R Square 0.94198129Adjusted R Square 0.93037754Standard Error 611.751517Observations 7
Excel Output for Produce Stores
r2 = .94
94% of the variation in annual sales can be explained by the variability in the size of the store as measured by square footage.
Syxn
Bina Nusantara
Linear Regression Assumptions
• Normality– Y values are normally distributed for each
X– Probability distribution of error is normal
• Homoscedasticity (Constant Variance)• Independence of Errors
Bina Nusantara
Consequences of Violationof the Assumptions
• Violation of the Assumptions– Non-normality (error not normally distributed)– Heteroscedasticity (variance not constant)
• Usually happens in cross-sectional data– Autocorrelation (errors are not independent)
• Usually happens in time-series data• Consequences of Any Violation of the Assumptions
– Predictions and estimations obtained from the sample regression line will not be accurate
– Hypothesis testing results will not be reliable• It is Important to Verify the Assumptions
Bina Nusantara
• Y values are normally distributed around the regression line.
• For each X value, the “spread” or variance around the regression line is the same.
Variation of Errors Aroundthe Regression Line
X1
X2
X
Y
f(e)
Sample Regression Line
Bina Nusantara
Residual Analysis• Purposes
– Examine linearity – Evaluate violations of assumptions
• Graphical Analysis of Residuals– Plot residuals vs. X and time