我已经非常确定地证明,我使用标准回归生成的残差lm()可以通过具有 6 个左右自由度的 t 分布进行合理建模。我想使用glm()该错误模型,但我没有看到 t 适合其中一个系列。关于glm()与 t 配合良好的替代方案,或者可以作为 t 的替代品(或超集)的家族,有什么建议吗?
包heavy可以执行 t-student 回归模型。这是文档中的示例:
library(heavy)
data(ereturns)
fit <- heavyLm(m.marietta ~ CRSP, data = ereturns, family = Student(df = 6))
summary(fit)
# Linear model under heavy-tailed distributions
# Data: ereturns; Family: Student(df = 2.83727)
#
# Residuals:
# Min 1Q Median 3Q Max
# -0.142237 -0.036156 0.003433 0.041310 0.546533
#
# Coefficients:
# Estimate Std.Error Z value p-value
# (Intercept) -0.0072 0.0082 -0.8876 0.3748
# CRSP 1.2637 0.1902 6.6459 0.0000
#
# Degrees of freedom: 60 total; 58 residual
# Scale estimate: 0.002520795
# Log-likelihood: 71.81294 on 3 degrees of freedom
Run Code Online (Sandbox Code Playgroud)