Tidy 总结了有关模型组件的信息。模型组件可能是回归中的单个项、单个假设、聚类或类。 tidy 所认为的模型组件的确切含义因模型而异,但通常是不言而喻的。如果模型具有多种不同类型的组件,您将需要指定要返回哪些组件。
参数
- x
-
从
orcutt::cochrane.orcutt()
返回的orcutt
对象。 - ...
-
附加参数。不曾用过。仅需要匹配通用签名。注意:拼写错误的参数将被吸收到
...
中,并被忽略。如果拼写错误的参数有默认值,则将使用默认值。例如,如果您传递conf.lvel = 0.9
,所有计算将使用conf.level = 0.95
进行。这里有两个异常:
也可以看看
其他 orcutt 整理器:glance.orcutt()
值
带有列的 tibble::tibble()
:
- estimate
-
回归项的估计值。
- p.value
-
与观察到的统计量相关的两侧 p 值。
- statistic
-
在回归项非零的假设中使用的 T-statistic 的值。
- std.error
-
回归项的标准误差。
- term
-
回归项的名称。
例子
# 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 tidy.robustbase.glmrob 整理 a(n) glmrob 对象
- R broom tidy.acf 整理 a(n) acf 对象
- R broom tidy.robustbase.lmrob 整理 a(n) lmrob 对象
- R broom tidy.biglm 整理 a(n) biglm 对象
- R broom tidy.garch 整理 a(n) garch 对象
- R broom tidy.rq 整理 a(n) rq 对象
- R broom tidy.kmeans 整理 a(n) kmeans 对象
- R broom tidy.betamfx 整理 a(n) betamfx 对象
- R broom tidy.anova 整理 a(n) anova 对象
- R broom tidy.btergm 整理 a(n) btergm 对象
- R broom tidy.cv.glmnet 整理 a(n) cv.glmnet 对象
- R broom tidy.roc 整理 a(n) roc 对象
- R broom tidy.poLCA 整理 a(n) poLCA 对象
- R broom tidy.emmGrid 整理 a(n) emmGrid 对象
- R broom tidy.Kendall 整理 a(n) Kendall 对象
- R broom tidy.survreg 整理 a(n) survreg 对象
- R broom tidy.ergm 整理 a(n) ergm 对象
- R broom tidy.pairwise.htest 整理 a(n)pairwise.htest 对象
- R broom tidy.coeftest 整理 a(n) coeftest 对象
- R broom tidy.polr 整理 a(n) polr 对象
- R broom tidy.map 整理 a(n) Map对象
- R broom tidy.survexp 整理 a(n) survexp 对象
- R broom tidy.margins 整理 a(n) 边距对象
- R broom tidy.Arima 整理 a(n) Arima 对象
- R broom tidy.lmRob 整理 a(n) lmRob 对象
注:本文由纯净天空筛选整理自等大神的英文原创作品 Tidy a(n) orcutt object。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。