Glance 接受模型對象並返回 tibble::tibble()
,其中僅包含一行模型摘要。摘要通常是擬合優度度量、殘差假設檢驗的 p 值或模型收斂信息。
Glance 永遠不會返返回自對建模函數的原始調用的信息。這包括建模函數的名稱或傳遞給建模函數的任何參數。
Glance 不計算匯總度量。相反,它將這些計算外包給適當的方法並將結果收集在一起。有時擬合優度測量是不確定的。在這些情況下,該度量將報告為 NA
。
無論模型矩陣是否秩虧,Glance 都會返回相同的列數。如果是這樣,則不再具有明確定義值的列中的條目將使用適當類型的 NA
進行填充。
參數
- x
-
從
orcutt::cochrane.orcutt()
返回的orcutt
對象。 - ...
-
附加參數。不曾用過。僅需要匹配通用簽名。注意:拚寫錯誤的參數將被吸收到
...
中,並被忽略。如果拚寫錯誤的參數有默認值,則將使用默認值。例如,如果您傳遞conf.lvel = 0.9
,所有計算將使用conf.level = 0.95
進行。這裏有兩個異常:
也可以看看
glance()
, orcutt::cochrane.orcutt()
其他 orcutt 整理器:tidy.orcutt()
值
恰好隻有一行和一列的 tibble::tibble()
:
- adj.r.squared
-
調整後的 R 平方統計量,除了考慮自由度之外,與 R 平方統計量類似。
- dw.original
-
Durbin-Watson原始擬合統計。
- dw.transformed
-
Durbin-Watson 變換擬合的統計量。
- nobs
-
使用的觀察數。
- number.interaction
-
交互次數。
- p.value.original
-
原始 Durbin-Watson 統計量的 P 值。
- p.value.transformed
-
變換後自相關的 P 值。
- r.squared
-
R 平方統計量,或模型解釋的變異百分比。也稱為決定係數。
- rho
-
Spearman 的 rho 自相關
例子
# load libraries for models and data
library(orcutt)
# fit model and summarize results
reg <- lm(mpg ~ wt + qsec + disp, mtcars)
tidy(reg)
#> # A tibble: 4 × 5
#> term estimate std.error statistic p.value
#> <chr> <dbl> <dbl> <dbl> <dbl>
#> 1 (Intercept) 19.8 5.94 3.33 0.00244
#> 2 wt -5.03 1.22 -4.11 0.000310
#> 3 qsec 0.927 0.342 2.71 0.0114
#> 4 disp -0.000128 0.0106 -0.0121 0.990
co <- cochrane.orcutt(reg)
tidy(co)
#> # A tibble: 4 × 5
#> term estimate std.error statistic p.value
#> <chr> <dbl> <dbl> <dbl> <dbl>
#> 1 (Intercept) 21.8 6.63 3.29 0.00279
#> 2 wt -4.85 1.33 -3.65 0.00112
#> 3 qsec 0.797 0.370 2.15 0.0402
#> 4 disp -0.00136 0.0110 -0.123 0.903
glance(co)
#> # A tibble: 1 × 9
#> r.squared adj.r.squared rho number.interaction dw.original
#> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 0.799 0.777 0.268 7 1.50
#> # ℹ 4 more variables: p.value.original <dbl>, dw.transformed <dbl>,
#> # p.value.transformed <dbl>, nobs <int>
相關用法
- R broom glance.rlm 瀏覽 a(n) rlm 對象
- R broom glance.felm 瞥一眼毛氈物體
- R broom glance.geeglm 瀏覽 a(n) geeglm 對象
- R broom glance.plm 瀏覽一個 (n) plm 對象
- R broom glance.biglm 瀏覽 a(n) biglm 對象
- R broom glance.clm 瀏覽 a(n) clm 對象
- R broom glance.rma 瀏覽一個(n) rma 對象
- R broom glance.multinom 瀏覽一個(n)多項對象
- R broom glance.survexp 瀏覽 a(n) survexp 對象
- R broom glance.survreg 看一眼 survreg 對象
- R broom glance.rq 查看 a(n) rq 對象
- R broom glance.mjoint 查看 a(n) mjoint 對象
- R broom glance.fitdistr 瀏覽 a(n) fitdistr 對象
- R broom glance.glm 瀏覽 a(n) glm 對象
- R broom glance.coxph 瀏覽 a(n) coxph 對象
- R broom glance.margins 瀏覽 (n) 個 margins 對象
- R broom glance.poLCA 瀏覽一個(n) poLCA 對象
- R broom glance.aov 瞥一眼 lm 物體
- R broom glance.sarlm 瀏覽一個(n)spatialreg對象
- R broom glance.polr 瀏覽 a(n) polr 對象
- R broom glance.negbin 看一眼 negbin 對象
- R broom glance.mlogit 瀏覽一個(n) mlogit 對象
- R broom glance.fixest 看一眼最固定的物體
- R broom glance.nls 瀏覽 a(n) nls 對象
- R broom glance.mfx 瀏覽一個 (n) mfx 對象
注:本文由純淨天空篩選整理自等大神的英文原創作品 Glance at a(n) orcutt object。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。