Lynn
Lynn

Reputation: 61

copy stargazer regression output to excel: values in () become -

I choose type ="html" and then copy and paste the output to excel.

All work perfectly except the () in surround a value transfers the value into a negative one.

For example, (2.451) that presents the standard errors becomes -2.451

Is there a way to fix this? Thanks!

Upvotes: 2

Views: 840

Answers (1)

Jeremy K.
Jeremy K.

Reputation: 1792

Excel interprets the parentheses around a number as an indication it should be negative. This is inconvenient for our standard errors and p-value reporting from stargazer, because (0.04) is not meant to be -0.04.

To work around this, you could:

  • Select all cells in your spreadsheet
  • Change the data type of all of the cells to "Text", so that they are not interpreted as numbers. (See screenshot below)
  • Then you can paste parenthesised numbers in, and they are treated as text (see below).

If you still need to work with some numbers as numbers, you can set those cells to "Number".

enter image description here

Upvotes: 2

Related Questions