固定效应模型矩阵排名不足

时间:2015-03-24 19:43:46

标签: r lmer

当我尝试运行混合效果模型时出现以下错误:

> LMER_MIXED <- as.data.frame(LMER_MIXED)
> m2 <- lmer(log_bid_price ~ . - state + (1|state), data = LMER_MIXED)
fixed-effect model matrix is rank deficient so dropping 1 column / coefficient

后使用插入符号包中的findLinearCombos来查看是否存在任何可线性组合的列:

> LMER_MIXED <- cbind(cbind(LMER_DESIGN, state), log_bid_price)
> findLinearCombos(LMER_MIXED)
$linearCombos
list()

$remove
NULL

有关如何删除此警告并找到不可线性分离的列的任何想法?

    > str(LMER_MIXED)
'data.frame':   11697 obs. of  63 variables:
 $ (Intercept)                                : num  1 1 1 1 1 1 1 1 1 1 ...
 $ month10                                    : num  0 0 0 0 0 0 0 0 0 0 ...
 $ month11                                    : num  0 0 0 0 0 0 0 0 0 0 ...
 $ month12                                    : num  0 0 0 0 0 0 0 0 0 0 ...
 $ month2                                     : num  0 0 0 0 0 0 0 0 0 0 ...
 $ month3                                     : num  0 0 0 0 0 0 0 0 0 0 ...
 $ month4                                     : num  1 1 0 0 0 0 1 0 0 0 ...
 $ month5                                     : num  0 0 1 1 1 1 0 1 0 0 ...
 $ month6                                     : num  0 0 0 0 0 0 0 0 1 1 ...
 $ month7                                     : num  0 0 0 0 0 0 0 0 0 0 ...
 $ month8                                     : num  0 0 0 0 0 0 0 0 0 0 ...
 $ month9                                     : num  0 0 0 0 0 0 0 0 0 0 ...
 $ weekend1                                   : num  0 0 1 1 0 0 0 0 0 0 ...
 $ weekendNone                                : num  0 0 0 0 0 0 0 0 0 0 ...
 $ day_of_week1                               : num  0 0 0 0 0 0 0 0 1 0 ...
...

我想问题是拦截列是一个线性组合?

0 个答案:

没有答案