如何解决使用 rqpd 进行分位数回归的总结不返回标准误差
我在 R 中使用 rqpd 包进行具有固定效果的分位数回归(quantreg 包不支持具有固定效果的分位数回归),如下所示:
reg_q1 <- rqpd::rqpd(NoneHousingExpense ~ totalIncome + treatmentMonthly +
as.factor(year) + HHsize_eq| Address,panel(method = "pfe",taus = seq(0.02,0.98,0.02),tauw = rep(1/49,49)),data = adj_df1,weights = adj_df1$rWeight)
我使用 summary(reg_q1)$coefficients
来获取系数和标准误差。一年前它运行良好,但一年后我又回到了我的代码,并且摘要函数只返回一个这样的字符:
Length Class Mode
coefficients 246 -none- numeric
residuals 1313054 -none- numeric
coef 246 -none- numeric
X 1 matrix.csr S4
Z 1 matrix.csr S4
y 26797 -none- numeric
ids 26797 -none- numeric
panel 6 -none- list
control 7 -none- list
formula 3 formula call
call 5 -none- call
rank 1 -none- numeric
您知道我如何从中获取标准错误吗?最近在输出方面是否更改了包?
解决方法
我遇到了同样的问题。不要使用 summary(reg_q1),而是尝试使用 rqpd::summary.rqpd(reg_q1)。这为我解决了。
,答案在这里:
summary.rqpd(reg_q1)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。