Skip to content
Prev 332802 / 398506 Next

problem with interaction in lmer even after creating an "interaction variable"

a_lampei <anna.lampei-bucharova <at> uni-tuebingen.de> writes:
This probably belongs on r-sig-mixed-models.

  Presumably 'home' is still correlated with one of the
columns of 'garden:gebiet'.

  Here's an example of how you can use svd() to find out which
of your columns are collinear:

set.seed(101)
d <- data.frame(x=runif(100),y=1:100,z=2:101)
m <- model.matrix(~x+y+z,data=d)
s <- svd(m)
zapsmall(s$d)
## [1] 828.8452   6.6989   2.6735   0.0000
## this tells us there is one collinear component
zapsmall(s$v)
##            [,1]       [,2]       [,3]       [,4]
## [1,] -0.0105005 -0.7187260  0.3872847  0.5773503
## [2,] -0.0054954 -0.4742947 -0.8803490  0.0000000
## [3,] -0.7017874  0.3692117 -0.1945349  0.5773503
## [4,] -0.7122879 -0.3495142  0.1927498 -0.5773503
## this tells us that the first (intercept), third (y),
## and fourth (z) column of the model matrix are
## involved in the collinear term, i.e.
## 1+y-z is zero