1

I have computed several models, using both glm() and rxGlm() (the second one is from Microsoft R). Unfortunately, rxGlm() does not store all information required by stargazer. So when trying to create the summary table (even after adjusting the RxGlm data via as.glm() ), I get the following error message:

Error in qr.lm(object) : lm object does not have a proper 'qr' component.
 Rank zero or should not have used lm(.., qr=FALSE).

I am already reading out separetly the t-statistics and p-values and feed them back to stargazer separately. However, stargazer still requires the model output objects to be stored in the workspace and otherwise sends an error message.

This is how I extract the statistics from the model output:

obj1.t <- summary(obj1)$coef[ , "z value"]
obj1.p <- summary(obj1)$coef[ , "Pr(>|z|)"]

This is a simplified form of my stargazer command, where se = and p = are used to feed back the previously extracted statistics.

stargazer(list(obj1, obj2), 
          type = "html", table.layout = "cd=!t-s-!a=!n", star.cutoffs=c(0.05,0.01,0.001), no.space = TRUE, 
          omit = c(1989:2015), font.size = "normalsize", 
          out = "Test.html", 
          df= FALSE, 
          column.labels = c("(1)", "(2)"),
          add.lines = list(c("fixed effects", "No", "Yes")), 
          dep.var.labels = c("Dummy"),
          title = "GLM PROBIT MODEL",
          se= list(obj1.t, obj2.t),
          p = list(obj1.p, obj2.p),
          notes = "t statistics shown in parentheses")

Now my question: is there a way to create regression output tables with stargazer without having to provide the model output objects? So basically store all the required data in separate vectors and then feed them back to stargazer? RxGlm summaries provide all the information that is necessary to fill the regression results table manually. However, I am looking for a way to do it automatically.

deca
  • 730
  • 1
  • 8
  • 24
  • Please provide [minimal working example](https://stackoverflow.com/help/mcve). – jay.sf Nov 16 '17 at 08:55
  • Minimal working example is difficult in this case because running `RxGlm`models requires a separate version of R that needs to be installed first. I will add an example of my stargazer command though – deca Nov 16 '17 at 08:59
  • What you could do is to set `summary = FALSE`, so `stargazer()` creates arbitrary tables from any matrix or df; or therefore test the `tableHTML` package. With [this](https://stackoverflow.com/q/46835323/6574038) or [this hints](https://stackoverflow.com/a/43346168/6574038) you can even produce significance stars. – jay.sf Nov 19 '17 at 10:24

0 Answers0