Download presentation
Presentation is loading. Please wait.
1
EPI809/Spring 2008 1 Testing Individual Coefficients
2
EPI809/Spring 20082 Test of Slope Coefficient p 1. Tests if there is a Linear Relationship Between one X & Y 2. Involves one single population Slope p 3. Hypotheses: H 0 : p = 0 vs. H a : p 0
3
EPI809/Spring 20083 Test of Slope Coefficient p Test Statistic
4
EPI809/Spring 20084 Test of Slope Coefficient Rejection Rule Reject H 0 in favor of H a if t falls in colored area Reject H 0 for H a if P-value = 2P(T>|t|) |t|)<α T=t(n-k-1) 0 t 1-α/2 (n-k-1) Reject H 0 0 α/2 -t 1-α/2 (n-k-1) α/2
5
EPI809/Spring 20085 Individual Coefficients SAS Output Parameter Estimates Parameter Standard Variable DF Estimate Error t Value Pr > |t| Intercept 1 0.06397 0.25986 0.25 0.8214 Food 1 0.20492 0.05882 3.48 0.0399 weight 1 0.28049 0.06860 4.09 0.0264 PP 22 00 11 ^ ^ ^ ^ β p /s ^ pp ^ P-value
6
EPI809/Spring 2008 6 Testing Model Portions
7
EPI809/Spring 20087 1.Tests the Contribution of a Set of X Variables to the Relationship With Y 2.Null Hypothesis H 0 : g+1 =... = k = 0 Variables in Set Do Not Improve Significantly the Model When All Other Variables Are Included Variables in Set Do Not Improve Significantly the Model When All Other Variables Are Included 3.Used in Selecting X Variables or Models Testing Model Portions
8
EPI809/Spring 20088 Testing Model Portions Nested Models H 0 : Reduced model ( g+1 =... = k = 0 ) H a : Full model
9
EPI809/Spring 20089 F-Test for Nested Models Numerator Reduction in SSE from additional parameters df = k-g = number of additional parameters Denominator SSE of full model df=n-(k+1)=error df of full model
10
EPI809/Spring 2008 10 Selecting Variables in Model Building
11
EPI809/Spring 200811 Model Building with Computer Searches 1. Rule: Use as Few X Variables As Possible 2. Stepwise Regression Computer Selects X Variable Most Highly Correlated With Y Computer Selects X Variable Most Highly Correlated With Y Continues to Add or Remove Variables Depending on SSE Continues to Add or Remove Variables Depending on SSE 3. Best Subset Approach Computer Examines All Possible Sets Computer Examines All Possible Sets
12
EPI809/Spring 200812 Residual Analysis for goodness of fit
13
EPI809/Spring 200813 Residual (Estimated Errors) Analysis 1. Graphical Analysis of Residuals Plot Estimated Errors vs. X i Values (or pred.) Plot Estimated Errors vs. X i Values (or pred.) Plot Histogram or Stem-&-Leaf of Residuals Plot Histogram or Stem-&-Leaf of Residuals 2. Purposes - Examine Functional Form (Linear vs. Non- Linear Model) - Evaluate Violations of Assumptions (to insure validity of the statistic tests on β’s)
14
EPI809/Spring 200814 We recall Linear Regression Assumptions 1. Mean of Distribution of Error Is 0 2. Distribution of Error Has Constant Variance 3. Distribution of Error is Normal 4. Errors Are Independent
15
EPI809/Spring 200815 Residual Plot for Functional Form Nonlinear pattern Correct Specification
16
EPI809/Spring 200816 Residual Plot for Equal Variance Unequal Variance Correct Specification Fan-shaped. Standardized residuals used typically (residual divided by standard error of prediction)
17
EPI809/Spring 200817 Residual Plot for Independence Not Independent Correct Specification
18
EPI809/Spring 200818 Residuals Diagnostics in SAS symbol v=dot h=2 c=green; PROC REG data=Cow; model milk = food weight; plot residual.*predicted. /cHREF=red cframe=ligr; /cHREF=red cframe=ligr; run;
19
EPI809/Spring 200819
20
EPI809/Spring 200820 Check for Outlying Observations and Influence analysis symbol v=dot h=2 c=green; proc reg data=cow; model milk = food weight/influence; plot rstudent.*obs. / vref=-2 2 cvref=blue lvref=2 HREF=0 to 7 by 1 cHREF=red cframe=ligr; run;
21
EPI809/Spring 200821
22
EPI809/Spring 200822 Influence analysis of each obs. The REG Procedure Model: MODEL1 Dependent Variable: Milk Output Statistics Hat Diag Cov -----------DFBETAS----------- Obs Residual RStudent H Ratio DFFITS Intercept Food weight 1 0.1701 0.8283 0.5473 3.0770 0.9108 0.8436 -0.5503 0.0565 2 0.0527 0.2040 0.4552 5.8235 0.1865 -0.0632 -0.0215 0.1145 3 0.0408 0.1688 0.5271 6.8398 0.1782 0.1530 0.0335 -0.1211 4 -0.0520 -0.2266 0.5678 7.2379 -0.2597 -0.0164 0.1767 -0.2170 5 -0.4155 -4.0459 0.2260 0.0056 -2.1863 -0.9217 -1.0080 1.0753 6 0.2039 1.4531 0.6766 1.2013 2.1019 -0.5540 1.7420 -0.9265
23
EPI809/Spring 200823 Multicollinearity 1.High Correlation Between X Variables 2.Coefficients Measure Combined Effect 3.Leads to Unstable Coefficients Depending on X Variables in Model 4.Always Exists 5. Example: Using Both Age & Height of children as indep. Var. in Same Model
24
EPI809/Spring 200824 Detecting Multicollinearity 1.Examine Correlation Matrix Correlations Between Pairs of X Variables Are More than With Y Variable Correlations Between Pairs of X Variables Are More than With Y Variable 2.Examine Variance Inflation Factor (VIF) If VIF j > 5 (or 10 according to most references), Multicollinearity Exists If VIF j > 5 (or 10 according to most references), Multicollinearity Exists 3.Few Remedies Obtain New Sample Data Obtain New Sample Data Eliminate One Correlated X Variable Eliminate One Correlated X Variable
25
EPI809/Spring 200825 SAS CODES :VET EXAMPLE PROC CORR data=vet; VAR milk food weight; run;
26
EPI809/Spring 200826 Correlation Matrix SAS Computer Output Pearson Correlation Coefficients, N = 6 Prob > |r| under H0: Rho=0 Milk Food weight Milk 1.00000 0.90932 0.93117 0.0120 0.0069 Food 0.90932 1.00000 0.74118 0.0120 0.0918 weight 0.93117 0.74118 1.00000 0.0069 0.0918 r Y1 r Y2 All 1’s r 12
27
EPI809/Spring 200827 Variance Inflation Factors SAS CODES /* VIF measures the inflation in the variances of the parameter estimates due to collinearity that exists among the regressors or (dependent) variables */ PROC REG data=Cow; model milk = food weight/VIF; run;
28
EPI809/Spring 200828 Variance Inflation Factors Computer Output Parameter Estimates Parameter Standard Variance Variable DF Estimate Error t Value Pr > |t| Inflation Intercept 1 0.06397 0.25986 0.25 0.8214 0 Food 1 0.20492 0.05882 3.48 0.0399 2.21898 weight 1 0.28049 0.06860 4.09 0.0264 2.21898 VIF 1 5
29
EPI809/Spring 200829 Types of Regression Models viewed from the explanatory variables standpoint
30
EPI809/Spring 200830
31
EPI809/Spring 2008 31 Regression Models based on a Single Quantitative Explanatory Variable
32
EPI809/Spring 200832 Types of Regression Models
33
EPI809/Spring 200833 First-Order Model With 1 Independent Variable
34
EPI809/Spring 200834 First-Order Model With 1 Independent Variable 1.Relationship Between 1 Dependent & 1 Independent Variable Is Linear
35
EPI809/Spring 200835 First-Order Model With 1 Independent Variable 1.Relationship Between 1 Dependent & 1 Independent Variable Is Linear 2.Used When Expected Rate of Change in Y Per Unit Change in X Is Stable
36
EPI809/Spring 200836 First-Order Model Relationships 1 < 0 1 > 0 Y X 1 Y X 1
37
EPI809/Spring 200837 First-Order Model Worksheet Run regression with Y, X 1
38
EPI809/Spring 200838 Types of Regression Models
39
EPI809/Spring 200839 Second-Order Model With 1 Independent Variable 1.Relationship Between 1 Dependent & 1 Independent Variables Is a Quadratic Function 2.Useful 1 St Model If Non-Linear Relationship Suspected
40
EPI809/Spring 200840 Second-Order Model With 1 Independent Variable 1.Relationship Between 1 Dependent & 1 Independent Variables Is a Quadratic Function 2.Useful 1 St Model If Non-Linear Relationship Suspected 3.Model Linear effect Curvilinear effect
41
EPI809/Spring 200841 Second-Order Model Relationships 2 > 0 2 < 0
42
EPI809/Spring 200842 Second-Order Model Worksheet Create X 1 2 column. Run regression with Y, X 1, X 1 2.
43
EPI809/Spring 200843 Types of Regression Models
44
EPI809/Spring 200844 Third-Order Model With 1 Independent Variable 1.Relationship Between 1 Dependent & 1 Independent Variable Has a ‘Wave’ 2.Used If 1 Reversal in Curvature
45
EPI809/Spring 200845 Third-Order Model With 1 Independent Variable 1.Relationship Between 1 Dependent & 1 Independent Variable Has a ‘Wave’ 2.Used If 1 Reversal in Curvature 3.Model Linear effect Curvilinear effects
46
EPI809/Spring 200846 Third-Order Model Relationships 3 < 0 3 > 0
47
EPI809/Spring 200847 Third-Order Model Worksheet Multiply X 1 by X 1 to get X 1 2. Multiply X 1 by X 1 by X 1 to get X 1 3. Run regression with Y, X 1, X 1 2, X 1 3.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.