tidy() function is displaying p values strangely and putting some values in red

Hi,

I'm using the tidy function in broom to look at my glm. For some reason it always displays the p value as e - regardless of whether it is negative. It also seems to put some of my values in red. It happens which ever data set I use for a glm...not sure what I've done!

eg the output below or this


term        estimate std.error statistic   p.value
  <chr>          <dbl>     <dbl>     <dbl>     <dbl>
1 (Intercept)  -1.10      0.0460    -23.8  1.07e-125
2 z.age        -0.0517    0.0465     -1.11 2.67e-  1

Is there a setting I have messed up?

The red values simply designate negative numbers. You can turn that off with

options(pillar.neg = FALSE)

The number format 1.07e-125 means "1.07 times 10 raised to the power -125". So 2.67e-1 = 0.267

Thats great, thanks!!! Is there a way to get it to write normally? raised to the power is fine for tiny numbers, but its a little annoying for 0.267!

You can use this option:

options ( scipen = 999 )

Brgds. Henrik

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.