Download presentation
Presentation is loading. Please wait.
Published byAdela Parker Modified over 9 years ago
1
Curvilinear 2 Modeling Departures from the Straight Line (Curves and Interactions)
2
Skill Set How does polynomial regression test for quadratic and cubic trends? What are orthogonal polynomials? When can they be used? Describe an advantage of using orthogonal polynomials over simple polynomial regression. Suppose we have one IV and we analyze this IV twice, once thru linear regression and once as a categorical variable. What does the test for the difference in R-square between the two tell us? What doesn’t it tell us, that is, if the result is significant, what is left to do?
3
More skills Why is collinearity likely to be a problem in using polynomial regression? Describe the sequence of tests used to model curves in polynomial regression. How do you model interactions of continuous variables with regression? What is the difference between a moderator and a mediator? How do you test for the presence of each?
4
Nonlinear Trends in Experimental Research Suppose we go to Bush Gardens and Measure reactions to a roller coaster as a function of time. We ask for excitement ratings (1 to 10 scale) either immediately after the ride or at 5, 10 or 15 minutes after.
5
Roller Coaster Ratings Note that IV is represented in 2 ways (a) as a continuous IV, and (b) as a dummy coded (3 vector) categorical IV. Excitement as a function of time.
6
SAS boxplots of roller coaster data.
7
R-square Roller coaster data analysis with time as continuous IV
8
R-square Analysis with time as a categorical IV
9
Testing for curves Compare the R-square values. Linear:.51987. Categorical:.5892. Critical value (alpha =.05) of F (2,16) = 3.63, n.s. If significant, the F test indicates departure from linearity, but not where or how. If you have M levels, can have up to (M-1) bends.
10
Review Suppose we have one IV and we analyze this IV twice, once thru linear regression and once as a categorical variable. What does the test for the difference in R- square between the two tell us? What doesn’t it tell us, that is, if the result is significant, what is left to do?
11
Orthogonal Polynomials Sometimes orthogonal polynomials can be used to analyze experimental data to test for curves. Two restrictive assumptions must be met to use orthogonal polynomials: (1) equal ‘spacings’ of the IV, and (2) equal numbers of observations (people) at each cell (e.g., coaster data). Orthogonal polynomials are special sets of coefficients that test for bends but manage to remain uncorrelated with one another. This gives them an advantage in statistical power and in simplicity of understanding.
12
Coaster data with orthogonal polynomial vectors. Note the pattern in the vectors. Switches indicate bends. Find orthogonal polynomials in a table.
13
Orthogonal Poly Table PolynomialX=1234 Linear01 Quadratic1-21 Linear-313 Quadratic1 1 Cubic3-31 Note. Rows in table will be columns in data. Cols in table represent levels of IV.
14
Correlations Among Vectors RTimeExcite (Rating) LQC Time1 Excite-.721 Linear1.00-.721 Quad.00.25.001 Cubic.00.08.00 1 These are correlations among the vectors for the coaster data. Time in minutes since leaving the coaster correlated -.72 with excitement ratings. Time correlates 1.0 with the linear trend. Note that the Linear, Quadratic and Cubic vectors are uncorrelated (orthogonal).
15
Regression with Orthogonal Polynomials SourcedfEstimateType I & Type III SS FP Intercept 7.55 Linear1-.4520.25.0004 Quad1.352.45.1371 Cubic1.050.25.6239 Note that R-square for the model using orthogonal polynomials is the same as that using the dummy vectors. The F for the linear component is larger using orthogonal polynomials than it was for the linear regression because the error term is smaller due to the quadratic and cubic terms. Orthogonal polynomials provide a powerful test of effects. Also can be used to graph results to show bends.
16
Review How does polynomial regression test for quadratic and cubic trends? What are orthogonal polynomials? When can they be used?
17
Nonlinear Relations in Nonexperimental Research Create power terms (IV taken to successive powers) Test for increasing numbers of bends by adding terms Quit when adding a term does not increase variance accounted for.
18
Rating (DV) TimeTime**2Time**3 10000 9000 000 8000 9000 8525125 7525125 7525125 8525125 9525125 7101001000 6101001000 8101001000 5101001000 7101001000 5152253375 6152253375 7152253375 7152253375 8152253375 Polynomials to model bends in nonexperimental research
19
Correlations among terms ExciteTimeTime**2Time**3 Excite1 Time-.721 Time**2-.62.961 Time**3-.55.91.991 Note that terms with higher exponents are VERY highly correlated. There WILL be problems with collinearity. Sequence of tests. Start with time, add time squared. If significant, add time cubed. Stop when adding a term doesn’t help. Each power adds a bend. Quadratic is one bend, cubic is two, and so forth.
20
Results of Polynomial Regression ExciteTimeTime**2Time**3 Excite1 Time-.721 Time**2-.62.961 Time**3-.55.91.991 ModelInterceptb1b2b3R2R2 R 2 Ch 1 Time8.90-.18.52 2 Time, Time 2 9.25-.39.014.58.06 3 Time, Time 2, Time 3 9.20-.23-.02.001.59.01 Note that polynomial is a special case of hierarchical reg.
21
Polynomial Results (2) Suppose it had happened that the term for time-squared had been significant. The regression equation is Y' = 9.25 -.39X +.014X 2. The results graphed:
22
Interpreting Weights in Polynomial Regression All power terms for an IV work together to define the curve relating Y to X. Do not interpret b weights for polynomials. They change if you subtract the mean from the raw data. To estimate ‘importance’ look to the change in R-square for the block of variables that represent the IV. Never use polynomials in a variable selection algorithm (e.g., stepwise regression). Specialized literature on nonlinear terms in path analysis and SEM (hard to do).
23
Review Describe an advantage of using orthogonal polynomials over simple polynomial regression. Why is collinearity likely to be a problem in using polynomial regression? Describe the sequence of tests used to model curves in polynomial regression.
24
Interactions An interaction means that the ‘importance’ of one variable depends upon the value of another. An interaction is also sometimes called a moderator, as in “Z moderates the relations between X and Y.” In regression, we look to see if the slope relating the DV to the IV changes depending on the value of a second IV.
25
Example Interaction For those with low cog ability, there is a small correlation between creativity and productivity. As cognitive ability increases, the relations between creativity and productivity become stronger. The slope of productivity on creativity depends on cog ability.
26
Interaction Response Surface The slope of X1 depends on the value of X2 and vice versa. Regression is looking to fit this response surface and no other when we do the customary analysis for interactions with continuous IVs. More restrictive than ANOVA.
27
Significance Tests for Interactions Subtract means from each IV (optional). Compute product of IVs. Compute significance of change in R-square using interaction(s). If R-square change is n.s., no interaction(s) present. If R-square change is significant, find the significant interaction(s). Graph the interaction(s)
28
data d1; input person product create cog; inter=create*cog; cards; 15040100 2354580 3405090 45055105 55560110 6354095 74545100 85550105 9505595 10406090 114540110 125045115 136050120 146555125 155560105 165040110 17554595 185550115 196060120 20 65 65 140 proc print; proc corr; proc glm; model product = create cog; run; Data to test for interaction between cognitive ability and creativity on performance.
29
Pearson Correlation Coefficients, N = 20 Prob > |r| under H0: Rho=0 person product create cog inter person 1.00000 0.65629 0.32531 0.66705 0.57538 0.0017 0.1616 0.0013 0.0079 product 0.65629 1.00000 0.50470 0.83568 0.78465 0.0017 0.0232 <.0001 <.0001 create 0.32531 0.50470 1.00000 0.38414 0.84954 0.1616 0.0232 0.0945 <.0001 cog 0.66705 0.83568 0.38414 1.00000 0.80732 0.0013 <.0001 0.0945 <.0001 inter 0.57538 0.78465 0.84954 0.80732 1.00000 0.0079 <.0001 <.0001 <.0001 Correlation Matrix
30
Results for 2 IVs (Main Effects)
31
Result for interaction
32
Moderator and Mediator Moderator Means Interaction. Slope of one depends on the value of the other. Use moderated regression (test for an interaction) to test. Mediator means there is a causal chain of events. The mediating variable is the proximal cause of the DV. A more distal cause changes the mediator. Use path analysis to test. In this graph, X2 is the mediator.
33
Review How do you model interactions of continuous variables with regression? What is the difference between a moderator and a mediator? How do you test for the presence of each?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.