1

Recently I have used quantreg::rq() to estimate a quantile regression. It returns the following error when using summary():

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

I checked this question and found the solution, which is to set se method to iid : summary(df, se="iid) and it worked. But if I use stargazer() and set stargazer(df, rq.se="iid") it returns again the same error message :

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

Thus I want to ask is there a difference between summary() and stargazer() by calculating standard error?

Here are the codes and URL to test.RData:

library(quantreg)
library(stargazer)
df <- rq(logincome ~ ., data=rfmale1995,tau=c(0.2))
summary(df,se="iid")
stargazer(df,rq.se="iid")

Edit: I have checked the internal codes for stargazer. rq.se is nothing else but a direct extract from summary(model, se= ""). This means there should be no difference between summary() and stargazer() by calculating standard error. And it makes me more confused...

Marco
  • 2,368
  • 6
  • 22
  • 48
Fang
  • 23
  • 3
  • without *some* kind of reproducible example this is going to be hard to answer. Can you post your data somewhere? Provide concise code to simulate data that triggers the error? – Ben Bolker Oct 01 '22 at 16:22
  • I have uploaded the data to a file-hosting site. – Fang Oct 02 '22 at 01:22

0 Answers0