Announcement

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

  • Regarding bounded continuous variable

    Hi,

    I am running a regression in where my dependent variable is continuous and bounded between 1 and 5. What is the best method of regression in this case? I have tried normal OLS but some of my predicted values are larger than 5. Is there a way of transforming the variable or should I use another regression method?

    Thank you in advance!

    /Erik

  • #2
    Welcome to the Stata Forum / Statalist,

    I believe you should first analyze thoroughly your model. The reason(s) for predicted values above 5 will be spotted. This being said, that is not necessarily something you must get rid of.
    Best regards,

    Marcos

    Comment


    • #3
      I'd scale to [0, 1] use fracreg and scale back, i.e. start with

      Code:
      gen y2 = (y - 1)/4 
      The functional form Y = Xb is manifestly incompatible with those bounds.

      Comment


      • #4
        Thank you for your replies. Is there a way to use fracreg with panel data as well? Actually as Marcos says for my purposes I can just cut off predicted values over 5 or under 1, but it would be nice to have a model that deals with this automatically.

        Many thanks!

        Comment


        • #5
          I have to disagree with any suggestion of cutting off predictions. Indeed I don't read Marcos's post as suggesting that at all.

          Nothing was said about panel data in #1 but you may find xtgee accepts continuous responses with family(binomial) link(logit) vce(robust).

          Others will be more knowledgeable about the pros and cons of that.

          Comment


          • #6
            Er:
            why don't you post an excerpt of your data via -dataex- (type -search dataex- from within Stata to install it and follow to FAQ on how to use it)?.
            Moreover, it would be helpful to know some more details abput your panel data structure: is it a large N, small T one or the other way round? Is it static or dynamic? Thanks.
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              I just wish to underline that my advice was far from getting rid of unwelcome predictions. What I tried to remark in #2, quite the opposite, was that the bounds for predictive values may surpass the "real" values. The reason for that can be spotted after taking a close look at the data, for example, a small sample size, misspecifation issues, and questions related to accuracy as well as precision, to name a few.
              Best regards,

              Marcos

              Comment


              • #8
                Originally posted by Nick Cox View Post
                I'd scale to [0, 1] use fracreg and scale back, i.e. start with

                Code:
                gen y2 = (y - 1)/4 
                The functional form Y = Xb is manifestly incompatible with those bounds.
                what you mean by "scale back"?

                Comment


                • #9
                  My idea was just that if you go

                  y2 = (y - 1) / 4

                  to map to [0, 1] so also you would need to go

                  Y = 1 + 4 * Y2

                  to get back to [1, 5] if you had predictions Y2 in [0, 1] and wanted to see predictions on a scale from 1 to 5. If you wanted to see integer predictions, you need to give it more thought.

                  Comment

                  Working...
                  X