繁体   English   中英

如何在R中的glm()中使用t分布?

[英]How do I use t-distribution with glm() in R?

我已经非常确定性地确定,我可以使用标准lm()回归生成的残差可以通过自由度为6的t分布合理地建模。 我想将glm()与该错误模型一起使用,但是我没有看到t适合其中一个系列。 是否有任何建议与t一起使用的glm()替代方案,或对t的替代(或替代)合理发挥作用的家族?

heavy包装可以执行t型学生回归模型。 这是文档中的一个示例:

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM