R量子basksolve误差

R量子basksolve误差,r,quantreg,R,Quantreg,在R中安装quantreg软件包时,我收到以下警告: > library(quantreg) Loading required package: SparseM Package SparseM (0.96) loaded. To cite, see citation("SparseM") Attaching package: 'SparseM' The following object(s) are masked from 'package:base': ba

在R中安装quantreg软件包时,我收到以下警告:

> library(quantreg)
Loading required package: SparseM
Package SparseM (0.96) loaded.
       To cite, see citation("SparseM")


Attaching package: 'SparseM'

The following object(s) are masked from 'package:base':

    backsolve

Package quantreg (4.79) loaded.
        To cite, see citation("quantreg")
然后,在运行分位数回归后:

sym.lm  = rq(Y ~ X1 + X2 + X3 + X4 + X5 + X6 + X7, data = myd, na.action = na.omit, method = "fn", model = TRUE)
summary(sym.lm)
Error in base::backsolve(r, x, k = k, upper.tri = upper.tri, transpose = transpose,  : 
  singular matrix in 'backsolve'. First zero in diagonal [1]
In addition: Warning message:
In summary.rq(sym.lm) : 21010 non-positive fis

此错误与后解决范围问题有关吗?

我想不会。如果提供的矩阵是单一的,两个版本似乎都会抛出错误。也许我应该将问题转移到交叉验证。如何将此问题转移到交叉验证?矩阵的单一性与数据有关,而不是与包有关。我还注意到您没有指定
tau
。尝试指定
tau=0.5
并尝试运行常规
lm
,以便我们可以检查您输入的数据