Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Does it make sense to convert ordinal data to continuous data?

    Hi everyone,

    I am confused about one piece of advice I recently got. I am new to the Statalist. Any advice would be helpful.

    My dependent variable was cheated in binary 0 No and 1 Yes. My independent variable Internet use frequency is ordinal which scales from 0-5. My dataset does not contain continuous variables.


    Home_UseFre | Freq. Percent Cum.
    ------------------------------+-----------------------------------
    0. Never | 26,435 32.44 32.44
    1. Less often | 1,341 1.65 34.08
    2. Two or three times a month | 1,004 1.23 35.32
    3. About once a week | 2,548 3.13 38.44
    4. Two or three times a week | 7,412 9.10 47.54
    5. Everday | 42,753 52.46 100.00
    ------------------------------+-----------------------------------
    Total | 81,493 100.00


    Recently I received a piece of advice, saying that I could convert an ordinal variable to a continuous variable by calculating Internet Use Frequency in a different way.

    gen dailyuse=1 if HomeInternet_UseFre2==5
    replace dailyuse=3/7 if HomeInternet_UseFre2==4
    replace dailyuse=1/7 if HomeInternet_UseFre2==3
    replace dailyuse=3/30 if HomeInternet_UseFre2==2
    replace dailyuse=1/30 if HomeInternet_UseFre2==1
    replace dailyuse=0 if HomeInternet_UseFre3==0
    gen monthlyuse=dailyuse*30

    I am confused because I don't have outcomes in between. It seems to me it is still ordinal...

    xi: reg was_cheated monthlyuse i.country i.year, robust
    i.country _Icountry_1-28 (naturally coded; _Icountry_1 omitted)
    i.year _Iyear_2012-2014 (naturally coded; _Iyear_2012 omitted)

    Linear regression Number of obs = 80,726
    F(30, 80695) = 63.59
    Prob > F = 0.0000
    R-squared = 0.0231
    Root MSE = .1994

    ------------------------------------------------------------------------------
    | Robust
    was cheated | Coefficient std. err. t P>|t| [95% conf. interval]
    -------------+----------------------------------------------------------------
    monthlyuse | .0018875 .0000483 39.07 0.000 .0017928 .0019822
    _Icountry_2 | .0022566 .0060764 0.37 0.710 -.0096531 .0141663
    _Icountry_3 | -.0250789 .0049819 -5.03 0.000 -.0348434 -.0153145
    _Icountry_4 | -.0170618 .0057556 -2.96 0.003 -.0283427 -.005781
    _Icountry_5 | -.019575 .0062055 -3.15 0.002 -.0317377 -.0074123
    _Icountry_6 | -.0186162 .0054719 -3.40 0.001 -.0293411 -.0078913
    _Icountry_7 | -.0443105 .0051523 -8.60 0.000 -.054409 -.0342121
    _Icountry_8 | -.0268423 .0052589 -5.10 0.000 -.0371498 -.0165349
    _Icountry_9 | -.0286769 .0052796 -5.43 0.000 -.0390249 -.0183289
    _Icountry_10 | -.0164776 .0056501 -2.92 0.004 -.0275518 -.0054034
    _Icountry_11 | -.0196329 .0050269 -3.91 0.000 -.0294856 -.0097801
    _Icountry_12 | -.0351052 .0047009 -7.47 0.000 -.0443189 -.0258915
    _Icountry_13 | .0052594 .0058368 0.90 0.368 -.0061806 .0166995
    _Icountry_14 | .0160564 .0063944 2.51 0.012 .0035233 .0285895
    _Icountry_15 | .0049058 .0059756 0.82 0.412 -.0068063 .016618
    _Icountry_16 | -.020624 .0055054 -3.75 0.000 -.0314145 -.0098335
    _Icountry_17 | -.0369843 .0047976 -7.71 0.000 -.0463877 -.027581
    _Icountry_18 | -.0128085 .007103 -1.80 0.071 -.0267304 .0011134
    _Icountry_19 | -.0118751 .0065553 -1.81 0.070 -.0247236 .0009733
    _Icountry_20 | -.0309234 .0055722 -5.55 0.000 -.041845 -.0200018
    _Icountry_21 | -.0029465 .0057438 -0.51 0.608 -.0142043 .0083113
    _Icountry_22 | -.01028 .0053885 -1.91 0.056 -.0208414 .0002814
    _Icountry_23 | .008407 .0058183 1.44 0.148 -.0029968 .0198108
    _Icountry_24 | -.0229542 .0051753 -4.44 0.000 -.0330976 -.0128107
    _Icountry_25 | -.0388518 .0047679 -8.15 0.000 -.048197 -.0295067
    _Icountry_26 | -.0121882 .0055453 -2.20 0.028 -.023057 -.0013194
    _Icountry_27 | -.0309794 .0055288 -5.60 0.000 -.0418159 -.0201429
    _Icountry_28 | .0179311 .0059467 3.02 0.003 .0062755 .0295866
    _Iyear_2013 | -.0123799 .001739 -7.12 0.000 -.0157883 -.0089715
    _Iyear_2014 | -.0076126 .0017975 -4.24 0.000 -.0111356 -.0040896
    _cons | .0320291 .0043067 7.44 0.000 .0235881 .0404702
    ------------------------------------------------------------------------------

    Does this regression result mean one day increase in monthly Internet use increases the probability to be getting cheated by 0.19 percentage points? The person who recommended this to me also says I should do the log value. But I am really confused about the validity of this advice and need more help.

    Thanks so much.



    Last edited by Coco Sun; 12 Nov 2022, 09:53.

  • #2
    It's not particularly accurate (the most problematic might be the way you are coding "less often"), but I can see how the advice makes some sense. And yes, what you ultimately get is not merely an ordinal variable, it is cardinal. Someone with dailyuse of 1 (uses internet everyday) uses the internet about seven times as much as someone who uses it roughly once a week (dailyuse = 1/7).

    And yes, your interpretation of the coefficient is broadly correct.

    Comment


    • #3
      Hi Hemanshu Kumar, Thank you so much for your reply. I will think about it. One more question, do I need to do the log transformation for the monthly use variable?

      Comment


      • #4
        Log transformation of a regressor is usually done when you expect that the growth rate of the variable will be linearly related to the dependent variable in the model (rather than absolute increases in its value), and/or when it has some really large values that we want to be able to model sensibly with the other values. Neither condition is true your variable, which varies between 0-30. So, no.

        Comment


        • #5
          I got it! Thank you so much for your advice!

          Comment


          • #6
            This handout discusses ordinal independent variables, and when and whether you can treat them as continuous.

            https://www3.nd.edu/~rwilliam/xsoc73...ndependent.pdf

            Better still is this piece from Sage Research Methods Foundations, which you may or may not be able to access for free.

            https://methods.sagepub.com/foundati...dent-variables
            -------------------------------------------
            Richard Williams, Notre Dame Dept of Sociology
            StataNow Version: 19.5 MP (2 processor)

            EMAIL: [email protected]
            WWW: https://www3.nd.edu/~rwilliam

            Comment


            • #7
              Ok, I will take a look at these handouts. Thank you so much, Mr. Williams!

              Comment

              Working...
              X