<p>A dummy variable is a binary variable, that does need to be logged. You can use them as they are. Also, if the variable is set to 1 for a given result and zero otherwise, by taking logs you will turn your variable to 0 and a missing value because the log of 0 does not exist.</p>

<hr>

<p>update: Instead of a plot, why not simply calculate pairwise correlation coefficients. Here is an example using Stata</p>

<pre><code>. sysuse auto, clear
(1978 Automobile Data)

. * Create a dummy variable
. gen byte big= weight&gt;3020

. ta big

        big |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         35       47.30       47.30
          1 |         39       52.70      100.00
------------+-----------------------------------
      Total |         74      100.00

. * Correlate big with price
. pwcorr big price

             |      big    price
-------------+------------------
         big |   1.0000 
       price |   0.3469   1.0000 

Both are positively correlated.

. * Add a other dummy and compute new correlations


    pwcorr price foreign big

             |    price  foreign      big
-------------+---------------------------
       price |   1.0000 
     foreign |   0.0487   1.0000 
         big |   0.3469  -0.5682   1.0000 
</code></pre>

CC BY-SA 4.0
2020-05-19T17:40:13.630Z
I have updated the post with an image
David K
CC BY-SA 4.0
2020-05-19T07:23:18.117Z
2020-05-19T20:05:38.547Z
2020-05-19T20:05:38.547Z
emeryville
<p><a href="https://i.sstatic.net/GgfbD.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/GgfbD.jpg" alt="enter image description here"></a>I am having a bunch of dummies variables and some of them when trying to get the scatter plots they are collapsed on the horizontal line. It is hard to see any relation. I know from theory they should show some correlation with the key variables. Winsorizing did not help much. Is it correct to get the log of the dummies only for those specific dummies? What do you people think on this? 
I attach an image from stata</p>

CC BY-SA 4.0
2020-05-19T09:03:24.960Z
"*the scatter plots they are collapsed on the horizontal line*" I do not understand the dimensions here. $(x,y)$ where $x$ is a dummy? Can you attack an image to your question?
Giskard
CC BY-SA 4.0
2020-05-19T12:11:06.847Z
What I am trying to say is that when I take the scatter plots I am seeing only some lines. Those are either at zero (left of y) of either at one(right) of y) or at bottom ((x) . Hard to examine any relation between the dummy and the key variables.  Other dummies used are fine. Could there be any way to solve this?
David K
CC BY-SA 4.0
2020-05-19T13:31:42.667Z
Are you familiar with the saying "sometimes a picture is worth a thousand words"? How about inserting the scatter plot into your question? It is really easy to do.
Giskard
CC BY-SA 4.0
2020-05-19T17:39:48.633Z
I have updated the post with an image
David K
CC BY-SA 4.0
2020-05-19T19:53:17.963Z
But...this is what it is supposed to look like? Dummy variables can only take values "0" and "1". Any scattering with a dummy inside the square would imply that the dummy somehow took a value different from 0 and 1.
Giskard
CC BY-SA 4.0
2020-05-19T21:27:09.613Z
Dummies variables here show if an event took place in a specific time period. 0 is no event, 1 event. They way they are in the scatter boxes is hard to understand what is going on. Look also at the categorical variable f, how oddly is represented in boxes. Is there a way to manipulate them say take the log or other?
David K
<econometrics>
Log of dummies variables
David K
# Log of dummies variables

(Asked by: username_0 on 2020-05-19)

[![enter image description here](https://i.sstatic.net/GgfbD.jpg)](https://i.sstatic.net/GgfbD.jpg)I am having a bunch of dummies variables and some of them when trying to get the scatter plots they are collapsed on the horizontal line. It is hard to see any relation. I know from theory they should show some correlation with the key variables. Winsorizing did not help much. Is it correct to get the log of the dummies only for those specific dummies? What do you people think on this?
I attach an image from stata

**Tags:** econometrics

> **Comments:**
> **username_1**: "*the scatter plots they are collapsed on the horizontal line*" I do not understand the dimensions here. $(x,y)$ where $x$ is a dummy? Can you attack an image to your question?  
> **username_0**: What I am trying to say is that when I take the scatter plots I am seeing only some lines. Those are either at zero (left of y) of either at one(right) of y) or at bottom ((x) . Hard to examine any relation between the dummy and the key variables.  Other dummies used are fine. Could there be any way to solve this?  
> **username_1**: Are you familiar with the saying "sometimes a picture is worth a thousand words"? How about inserting the scatter plot into your question? It is really easy to do.  
> **username_0**: I have updated the post with an image  
> **username_1**: But...this is what it is supposed to look like? Dummy variables can only take values "0" and "1". Any scattering with a dummy inside the square would imply that the dummy somehow took a value different from 0 and 1.  
> **username_0**: Dummies variables here show if an event took place in a specific time period. 0 is no event, 1 event. They way they are in the scatter boxes is hard to understand what is going on. Look also at the categorical variable f, how oddly is represented in boxes. Is there a way to manipulate them say take the log or other?  

---

## 1 answers

### Answer by username_2 on 2020-05-19. Score: 4

A dummy variable is a binary variable, that does need to be logged. You can use them as they are. Also, if the variable is set to 1 for a given result and zero otherwise, by taking logs you will turn your variable to 0 and a missing value because the log of 0 does not exist.

---

update: Instead of a plot, why not simply calculate pairwise correlation coefficients. Here is an example using Stata

```
. sysuse auto, clear
(1978 Automobile Data)

. * Create a dummy variable
. gen byte big= weight>3020

. ta big

        big |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         35       47.30       47.30
          1 |         39       52.70      100.00
------------+-----------------------------------
      Total |         74      100.00

. * Correlate big with price
. pwcorr big price

             |      big    price
-------------+------------------
         big |   1.0000 
       price |   0.3469   1.0000 

Both are positively correlated.

. * Add a other dummy and compute new correlations

    pwcorr price foreign big

             |    price  foreign      big
-------------+---------------------------
       price |   1.0000 
     foreign |   0.0487   1.0000 
         big |   0.3469  -0.5682   1.0000 

```

> **Comments:**
> **username_0**: I have updated the post with an image  

---

