Error in summary quantreg backsolve

陌路散爱 提交于 2020-06-25 10:23:34

问题


When I run a quantile regression in R, using the quantreg package, and then I run summary(quantregObject), I get this error message:

Error in base::backsolve(r, x, k = k, upper.tri = upper.tri, transpose = transpose, : singular matrix in 'backsolve'. First zero in diagonal [1]

Any suggestion how could I fix this problem?


回答1:


In short, try:

summary(quantregObject, se = "iid")

which puts a strong assumption on your residuals. Or if you need accuracy use a boot strap to get the standard errors:

summary(quantregObject, se = "boot")

If you call summary on a an object returned by quantreg:rq

summary(quantregObject)

This will call summary.rq.

From ?summary.rq.

You can see that there are 4 options to compute the standard errors (se). Depending on the sample size (N < 1000) the default is se = "rank" or se = "nid". "nid" does something which sounds complicated and may then yield a diagonal matrix which backsolve cannot handle.



来源:https://stackoverflow.com/questions/28393176/error-in-summary-quantreg-backsolve

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!