1
$\begingroup$

Below is my output for when soil.loss ~ +s(ksoil) + s(porosity)

              edf Ref.df     F  p-value    
s(ksoil)    3.832  3.832 19.40 1.22e-05 ***
s(porosity) 1.000  1.000 11.52  0.00499 ** 

Below is my output for each independent variable with response variable, when soil.loss ~ s(porosity)

              edf Ref.df     F p-value    
s(porosity) 2.899  2.899 130.5  <2e-16 ***

when soil.loss ~ s(ksoil)

           edf Ref.df     F p-value    
s(ksoil) 3.371  3.371 107.3  <2e-16 ***

Why does the EDF for porosity change from 2.899 into 1.00 , when the fitted model is combined?

$\endgroup$

1 Answer 1

1
$\begingroup$

Because ksoil and porosity are not orthogonal to one another.

Note that the meaning of the effect of ksoil in model

y ~ s(ksoil)

is very different to the meaning in model

y ~ s(porosity) + s(ksoil)

In the second model you are looking at the partial effect of ksoil given the effect of porosity. In the first model, the s(ksoil) term is explaining some of the variation in the response that can be explained by porosity. Once you account for ksoil the effect of porosity is linear.

$\endgroup$
2
  • 1
    $\begingroup$ Are the variable names switched in your last sentence? (i.e. "linear" is EDF = 1) $\endgroup$
    – GeoMatt22
    Jun 8, 2020 at 5:50
  • $\begingroup$ @GeoMatt22 Yes they are; I'll fix that $\endgroup$ Jun 17, 2020 at 1:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.