Glance 接受模型對象並返回 tibble::tibble()
,其中僅包含一行模型摘要。摘要通常是擬合優度度量、殘差假設檢驗的 p 值或模型收斂信息。
Glance 永遠不會返返回自對建模函數的原始調用的信息。這包括建模函數的名稱或傳遞給建模函數的任何參數。
Glance 不計算匯總度量。相反,它將這些計算外包給適當的方法並將結果收集在一起。有時擬合優度測量是不確定的。在這些情況下,該度量將報告為 NA
。
無論模型矩陣是否秩虧,Glance 都會返回相同的列數。如果是這樣,則不再具有明確定義值的列中的條目將使用適當類型的 NA
進行填充。
參數
- x
-
通過調用
drc::drm()
生成的drc
對象。 - ...
-
附加參數。不曾用過。僅需要匹配通用簽名。注意:拚寫錯誤的參數將被吸收到
...
中,並被忽略。如果拚寫錯誤的參數有默認值,則將使用默認值。例如,如果您傳遞conf.lvel = 0.9
,所有計算將使用conf.level = 0.95
進行。這裏有兩個異常:
也可以看看
其他 drc 整理器:augment.drc()
、tidy.drc()
值
恰好隻有一行和一列的 tibble::tibble()
:
- AIC
-
模型的 Akaike 信息準則。
- BIC
-
模型的貝葉斯信息準則。
- df.residual
-
剩餘自由度。
- logLik
-
模型的對數似然。 [stats::logLik()] 可能是一個有用的參考。
- AICc
-
針對小樣本進行 AIC 校正
例子
# load libraries for models and data
library(drc)
# fit model
mod <- drm(dead / total ~ conc, type,
weights = total, data = selenium, fct = LL.2(), type = "binomial"
)
# summarize model fit with tidiers
tidy(mod)
#> # A tibble: 8 × 6
#> term curve estimate std.error statistic p.value
#> <chr> <chr> <dbl> <dbl> <dbl> <dbl>
#> 1 b 1 -1.50 0.155 -9.67 2.01e-22
#> 2 b 2 -0.843 0.139 -6.06 1.35e- 9
#> 3 b 3 -2.16 0.138 -15.7 1.65e-55
#> 4 b 4 -1.45 0.169 -8.62 3.41e-18
#> 5 e 1 252. 13.8 18.2 1.16e-74
#> 6 e 2 378. 39.4 9.61 3.53e-22
#> 7 e 3 120. 5.91 20.3 1.14e-91
#> 8 e 4 88.8 8.62 10.3 3.28e-25
tidy(mod, conf.int = TRUE)
#> # A tibble: 8 × 8
#> term curve estimate std.error statistic p.value conf.low conf.high
#> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 b 1 -1.50 0.155 -9.67 2.01e-22 -1.81 -1.20
#> 2 b 2 -0.843 0.139 -6.06 1.35e- 9 -1.12 -0.571
#> 3 b 3 -2.16 0.138 -15.7 1.65e-55 -2.43 -1.89
#> 4 b 4 -1.45 0.169 -8.62 3.41e-18 -1.78 -1.12
#> 5 e 1 252. 13.8 18.2 1.16e-74 225. 279.
#> 6 e 2 378. 39.4 9.61 3.53e-22 301. 456.
#> 7 e 3 120. 5.91 20.3 1.14e-91 108. 131.
#> 8 e 4 88.8 8.62 10.3 3.28e-25 71.9 106.
glance(mod)
#> # A tibble: 1 × 4
#> AIC BIC logLik df.residual
#> <dbl> <dbl> <logLik> <int>
#> 1 768. 778. -376.2099 17
augment(mod, selenium)
#> # A tibble: 25 × 7
#> type conc total dead .fitted .resid .cooksd
#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 1 0 151 3 0 0.0199 0
#> 2 1 100 146 40 0.199 0.0748 0.0000909
#> 3 1 200 116 31 0.414 -0.146 0.000104
#> 4 1 300 159 85 0.565 -0.0302 0.00000516
#> 5 1 400 150 102 0.667 0.0133 0.00000220
#> 6 1 500 140 112 0.737 0.0633 0.0000720
#> 7 2 0 141 2 0 0.0142 0
#> 8 2 100 153 30 0.246 -0.0495 0.000168
#> 9 2 200 142 59 0.369 0.0468 0.0000347
#> 10 2 300 139 82 0.451 0.139 0.0000430
#> # ℹ 15 more rows
相關用法
- 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) drc object。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。