+ Reply to Thread
Results 1 to 6 of 6

Thread: How to handle dummy variable with fraction as possible values

  1. #1
    Points: 8, Level: 1
    Level completed: 15%, Points required for next Level: 42

    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to handle dummy variable with fraction as possible values




    Hello ,
    I am working on a data with a dummy variable values not just 0 or 1. It has fractions as values which denote the number of month within a year the a certain policy was in effect ; like 0.33 for 4 months and 0.5 for 6 months. This is the first time I am seeing this kind of dummy variable. I will appreciate any advise on how to proceed

    Samisan

  2. #2
    Omega Contributor
    Points: 38,374, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    6,998
    Thanks
    398
    Thanked 1,186 Times in 1,147 Posts

    Re: How to handle dummy variable with fraction as possible values

    Is it a dummy variable or are they trying to treat it as a continuous variable?


    Why can't you just dummy code it into 11 binary variables?
    Last edited by hlsmith; 08-12-2017 at 07:54 PM. Reason: Typos
    Stop cowardice, ban guns!

  3. #3
    Devorador de queso
    Points: 95,819, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,935
    Thanks
    307
    Thanked 2,629 Times in 2,245 Posts

    Re: How to handle dummy variable with fraction as possible values

    That doesn't sound like a dummy variable then.
    I don't have emotions and sometimes that makes me very sad.

  4. #4
    Points: 8, Level: 1
    Level completed: 15%, Points required for next Level: 42

    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to handle dummy variable with fraction as possible values

    It is a dummy. I will explain , somethin like a variable for the presence of gun control law in a state. In a panel data from 1990 to 2000; if the a gun control law was present throughout the year value is 1, if absent throughout the year value is 0 but if started let say by September 1 , it will be 0.25 ( 1/4th of the year) . if by July then value is 0.5( 1/2 of the year)

    Samisan

  5. #5
    Devorador de queso
    Points: 95,819, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,935
    Thanks
    307
    Thanked 2,629 Times in 2,245 Posts

    Re: How to handle dummy variable with fraction as possible values

    So once again... Doesn't sound like a dummy variable to me. It just sounds like a variable that measures the percent of the year that a criteria was or wasn't met. I'm not sure why you're tied to calling this a dummy variable (which has a specific meaning).

    I'm not sure what your question is though.
    I don't have emotions and sometimes that makes me very sad.

  6. The Following User Says Thank You to Dason For This Useful Post:

    ondansetron (08-13-2017)

  7. #6
    Points: 1,741, Level: 24
    Level completed: 41%, Points required for next Level: 59

    Posts
    230
    Thanks
    37
    Thanked 68 Times in 59 Posts

    Re: How to handle dummy variable with fraction as possible values


    The way I see it is you can keep it as is, and it has the interpretation that Dason mentioned just above, or you can make 11 dummy variables as hlsmith noted. X1= 1 if effective in January; 0 if not....X11= 1 if effective in November; 0 if not... December would be the base level in my example, but that's arbitrary and you might have a better reason for selecting one month as the base level in comparison to another.

    The choice depends on whether or not you think the relationship is more smooth and the average is about the same for these groups, in which case you may opt to keep the current variable, again not a dummy variable. If you think the relationship needs to account for discrete changes in the means between groups, or maybe that slopes differ between the groups, then the dummy variable route may be more appropriate for you (need interaction if you want different slopes between groups).

+ Reply to Thread

           




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats