Announcement

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

  • FRM estimation in panel data

    Dear researchers,

    I estimate balanced panel data N = 77, T = 6, in which the dependent variable is bounded and ranges from 0 to 1 (fractional dependent variable).
    To take into account the fractional nature of the dependent variable, I decided to evaluate the model using the frm package (fractional regression models).
    Below is the model that was planned to be evaluated using the frm package:

    frm shareorg_ecoinn9_1 illness_genit_lag1 ERI_LAG1 density_nord_lag1 shresearch_personnel_lag1 lngrpu_lag1 i.year, vce(r)

    However, instead of the results, the program produced an error that I don't quite understand:

    The dependent variable has values ​​outside the unit interval
    r (198);

    Could you tell me why this error could have come out if the frm package is intended for evaluating fractional dependent variables, and the dependent variable lies in the interval [0;1] ?

    And to what extent can the frm package be appropriate for panel data?

    I would be grateful for any comments and advice.

    Kind regards,
    Karina

  • #2
    to answer your first question, please show us, in CODE blocks (see the FAQ), the result of "su shareorg_ecoinn9_1"

    Comment


    • #3
      Hello,

      Below is the code of regression:
      Code:
      frm shareorg_ecoinn9_1 illness_genit_lag1 ERI_LAG1 density_nord_lag1 shresearch_personnel_lag1 lngrpu_lag1
      The result is

      Code:
      The dependent variable has values outside the unit interval
      r(198);

      Comment


      • #4
        not what I asked for - maybe someone else can help you

        Comment


        • #5
          What Rich suggests, in post #2, is that you run the command
          Code:
          summarize shareorg_ecoinn9_1
          and it will report the minimum and maximum values of shareorg_ecoinn9_1, and perhaps you will see that the minimum is less than zero or the maximum is greater than 1, contrary to your expectations.

          Comment


          • #6
            Thanks.

            Descriptive statistics showed that the min and max values of the dependent variable shareorg_ecoinn9_1 are 0 and 1, respectively:

            Code:
            . summarize shareorg_ecoinn9_1
            
                Variable |        Obs        Mean    Std. Dev.       Min        Max
            -------------+---------------------------------------------------------
            shareorg~9_1 |        539    .2359857    .2066312          0          1
            
            .

            Comment


            • #7
              You describe your data as a balanced panel with N=77, T=6, for which I would expect 77*6 = 462 observations. We see here 539 observations.

              Do you perhaps have observations with missing values for shareorg_ecoinn9_1? Looking at the code for frm.ado I see that in your case it will do, in effect,
              Code:
              count if (shareorg_ecoinn9_1<0 | shareorg_ecoinn9_1>1)
              and will throw the error you received if the count is not zero. But Stata missing values are treated as greater than any non-missing value, in particular, greater than 1.

              I suggest you reduce your dataset to just the balanced panel prior to running the frm command.

              I will add here my concern that frm does not appear to pay attention to the if and in qualifiers that the command syntax says it accepts, and in any event, the checking for the [0,1] interval is done without reference to anything specified for these qualifiers, which is why I did not suggest using if or in to restrict the command to your balanced panel. I cannot explore this further because the example dataset included in the help documentation is no longer available at the URL given.

              Comment


              • #8
                William, thank you.
                Your advice helped me. I did have missing values on the dependent variable and was trying to limit the time frame with the operator if .
                Now I have truncated the selection so that there are only non-empty values, and the frm command worked.

                Comment

                Working...
                X