多元回归输出中的 NA 和负贝塔系数

时间:2021-06-07 14:19:34

标签: r regression linear-regression na coefficients

在多元回归的输出中,我得到了 NA 和负 Beta 系数。

但是当我把变量 donderdag 放在等式的开头时,有一个结果而不是 NA,但现在 woensdag 得到了一个 NA。这里发生了什么?我该怎么做才能避免负 Beta 系数?

lm(formula = link_clicks_unique ~ expanded_view_avg_time + today_impressions_unique + 
    vrijdag + zaterdag + zondag + maandag + dinsdag + woensdag + 
    donderdag, data = zwitsal_t2_duration)

结果:

                           Estimate Std. Error t value Pr(>|t|)    
(Intercept)               0.5861669  0.0209341  28.001  < 2e-16 ***
expanded_view_avg_time    0.0032145  0.0005866   5.480 4.36e-08 ***
today_impressions_unique  0.0037398  0.0054384   0.688 0.491684    
vrijdag                  -0.0186911  0.0191080  -0.978 0.328008    
zaterdag                  0.0067248  0.0193532   0.347 0.728238    
zondag                   -0.0267094  0.0190372  -1.403 0.160646    
maandag                  -0.0107537  0.0190001  -0.566 0.571421    
dinsdag                   0.0030009  0.0189215   0.159 0.873992    
woensdag                 -0.0257946  0.0192104  -1.343 0.179388    
donderdag                        NA         NA      NA       NA

移动变量:

lm(formula = link_clicks_unique ~ expanded_view_avg_time + today_impressions_unique + 
    donderdag + vrijdag + zaterdag + zondag + maandag + dinsdag + 
    woensdag, data = zwitsal_t2_duration)

结果:

                           Estimate Std. Error t value Pr(>|t|)    
(Intercept)               0.5603723  0.0206519  27.134  < 2e-16 ***
expanded_view_avg_time    0.0032145  0.0005866   5.480 4.36e-08 ***
today_impressions_unique  0.0037398  0.0054384   0.688 0.491684    
donderdag                 0.0257946  0.0192104   1.343 0.179388    
vrijdag                   0.0071035  0.0190190   0.373 0.708786    
zaterdag                  0.0325195  0.0192748   1.687 0.091606 .  
zondag                   -0.0009148  0.0189527  -0.048 0.961506    
maandag                   0.0150409  0.0189190   0.795 0.426622    
dinsdag                   0.0287955  0.0188352   1.529 0.126344    
woensdag                         NA         NA      NA       NA

0 个答案:

没有答案