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...