Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R - stargazer 4 star cutoffs

I would like to use 4 star.cutoffs -- c(0.1, 0.05, 0.01, 0.001) -- using stargazer.

library(stargazer) 

m1 = lm(disp ~ mpg, data = mtcars) 
stargazer(m1, type = 'text', star.cutoffs = c(0.1, 0.05, 0.01, 0.001), digits = 2)

It seems that it is only possible to get 3 star cutoffs.

Any idea to get 4 cut offs?

like image 637
giac Avatar asked Oct 16 '25 01:10

giac


1 Answers

In addition to specifying star.cutoffs you should also specificy star.char .

This works fine for me:

stargazer(model1, model2,
          type = "text",
          star.char = c("+", "*", "**", "***"),
          star.cutoffs = c(0.1, 0.05, 0.01, 0.001),
          notes = c("+ p<0.1; * p<0.05; ** p<0.01; *** p<0.001"), 
          notes.append = F)
like image 60
JNWHH Avatar answered Oct 18 '25 17:10

JNWHH



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!