Download presentation
Presentation is loading. Please wait.
1
SADC Course in Statistics Comparing Regressions (Session 14)
2
To put your footer here go to View > Header and Footer 2 Learning Objectives At the end of this session, you will be able to understand and interpret the components of a linear model with one quantitative variable and one categorical factor interpret output from such models write regressions equations for each level of the categorical variable using the model estimates
3
To put your footer here go to View > Header and Footer 3 Return to the Paddy example In the paddy example, consider the possible effects of fertiliser and variety together. Objective is to explore whether fertiliser or variety of both affect paddy yields. Note that the two explanatory variables (we will call them factors) being considered here are of different types, one is a quantitative variable, the other is a categorical variable.
4
To put your footer here go to View > Header and Footer 4 Models with each factor in turn Previously we have fitted each variable one at a time. Thus the model with fertiliser alone is: y i = 0 + 1 (fert) i + i while the model with variety alone is: y ij = ’ 0 + v i + ij In models above, 0, ’ 0 represent constants, 1 is the slope of the line in first model and v i (i=1,2,3) represent the variety effect in 2 nd model.
5
To put your footer here go to View > Header and Footer 5 One model with both factors We can put the two factors together into a single model as: y ij = 0 + 1 (fert) ij + v i + ij This model fits a regression lines with common slope for each variety, i.e. it represents three parallel lines. The intercepts of the lines are: ( 0 + v 1 ), ( 0 + v 2 ) and ( 0 + v 3 ).
6
To put your footer here go to View > Header and Footer 6 Anova results (sequential) Sourced.f.S.S.M.S.FProb. Fertiliser129.94 130.80.000 Variety212.296.1426.90.000 Residual327.320.2288 Total3549.55 The Residual M.S. (s 2 ) = 0.2288. It describes the variation not explained by fertiliser and variety. How may the above results be interpreted?
7
To put your footer here go to View > Header and Footer 7 Anova results (adjusted) Sourced.f.Adj.SS.Adj.MS.FProb. Fertiliser16.95 30.40.000 Variety212.296.1426.90.000 Residual327.320.2288 Total3549.55 In anova above, each term has been adjusted for the other. So S.S. for fertiliser, variety and residual do not add to the total S.S. What conclusions may be drawn from above?
8
To put your footer here go to View > Header and Footer 8 Model estimates ParameterCoeff.Std.errortt prob 0 : constant 4.7760.32214.90.000 1 : fertiliser 0.5260.0965.510.000 g 1 (new) 0--- g 2 (old)-1.2070.269-4.490.000 g 3 (trad)-2.1790.304-7.160.000 What do these results tell us?
9
To put your footer here go to View > Header and Footer 9 Comparing variety means Thus:Old - New =-1.207 =Estimate of g 2 Trad - New =-2.179 =Estimate of g 3 In addition, because the results need to be adjusted for the effect of fertiliser, results again need to be reported in terms of adjusted means! These are usually calculated at the overall mean of the fertiliser variable = 1.444 As before, comparisons with the base level can be made using the model estimates.
10
To put your footer here go to View > Header and Footer 10 Raw means and adjusted means SampleRawStd.error VarietySize(n)Means (s.d./n) New improved4 5.960.128 Old improved17 4.540.173 Traditional15 3.000.168 VarietyAdjusted meansStd.error New improved5.540.251 Old improved4.330.122 Traditional3.360.139 Variety means adjusted for fertiliser effect:
11
To put your footer here go to View > Header and Footer 11 Parallel lines for each variety Equations describing the regression of yield on fertiliser for each variety are: y = 0 + 1 (fert) + v i y = ( 0 + v i ) + 1 (fert) Thus for the new improved variety, y = (4.776 + 0) + 0.526 (fert) y = 4.776 + 0.526 (fert) Similarly, equations can be found for the remaining two varieties.
12
To put your footer here go to View > Header and Footer 12 Model with different slopes We can put the two factors together into a single model as: y ij = 0 + 1 (fert) ij + v i + i (fert) ij + ij This model fits regression lines with different intercepts ( 0 + v i ), and diff. slopes ( 1 + i ). The separate slopes are: ( 1 + 1 ), ( 1 + 3 ) and ( 1 + 3 ).
13
To put your footer here go to View > Header and Footer 13 Anova with different slopes Sourced.f.Adj.SS.Adj.MS.FProb. Fertiliser10.391 1.60.211 Variety21.6100.8053.40.048 Fert*Var20.1430.0710.30.745 Residual307.1800.239 Total3549.55 Fitting separate lines involves fitting an interaction term (see below) What are your conclusions?
14
To put your footer here go to View > Header and Footer 14 Final model…. Clear from above that the added term in the model to allow for different slopes is non- significant. Hence return to the parallel lines model, i.e. y = 4.776 + 0.526(fert), for new variety y = 3.569 + 0.526(fert), for old variety y = 2.597 + 0.526(fert), for traditional
15
To put your footer here go to View > Header and Footer 15 Practical work follows to ensure learning objectives are achieved…
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.