【问题标题】:equatiomatic: Regression Model with hat on dependent variable and no epsilonequatiomatic:回归模型,在因变量上带有帽子且没有 epsilon
【发布时间】:2021-01-19 17:22:53
【问题描述】:

以下代码提供了要在knitr 中使用的回归模型方程。

library(equatiomatic)
fm1 <- lm(bill_length_mm ~ bill_depth_mm, penguins)
extract_eq(model = fm1, ital_vars = TRUE, use_coefs = TRUE)

$$
bill\_length\_mm = 55.07 - 0.65(bill\_depth\_mm) + \epsilon
$$

但是,我想得到回归模型方程,在依赖方差上带有帽子符号,最后没有 epsilon 符号。任何想法。

【问题讨论】:

    标签: r knitr equatiomatic


    【解决方案1】:

    在最新版本的equatiomatic (0.2.0.9000) 中,函数extract_equse_coefs = TRUE 参数提供了所需的输出。

    library(equatiomatic)
    packageVersion("equatiomatic")
    [1] ‘0.2.0.9000’
    fm1 <- lm(bill_length_mm ~ bill_depth_mm, penguins)
    extract_eq(model = fm1, ital_vars = TRUE, use_coefs = TRUE)
    $$
    \widehat{bill\_length\_mm} = 55.07 - 0.65(bill\_depth\_mm)
    $$
    

    【讨论】:

      猜你喜欢
      • 2016-08-02
      • 2020-09-23
      • 1970-01-01
      • 2023-03-12
      • 1970-01-01
      • 2014-04-12
      • 2021-09-25
      • 2018-09-17
      • 1970-01-01
      相关资源
      最近更新 更多