1

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

> 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

这是使用 caret 包中的 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 ...
...

我想问题是 Intercept 列是线性组合?

4

0 回答 0