Announcement

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

  • Maximum likelihood maximising

    Dear all,

    Please, I would like your help in the following problem that I have as a first post in the forum.

    I have a panel of countries where there are the classic macroeconomic variables, such as GDP, etc and some continuous and distinct quality indicators.
    In simple words, I have to create a new independent variable for each indicator in each period for which the current GDP is equal to the potential or the difference is minimized. Each indicator is independent and does not affect the other.

    Most likely with Maximum likelihood estimation, or other method, where I have to find the value of each indicator, in each period, creating a new value for the indicator independently for which the volatility of GDP is zeroed or minimized. That is, the current GDP is equal to or close to the maximum with the potential, estimated with the HP filter
    I hope it is understandable. Some of my details below

    Thanks for any help. I am already for your inputs

    Best
    Giorgio



    ----------------------- copy starting from the next line -----------------------
    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float id int ts str48 country float(indicator1 indicator2) double GDP_current float(GPD_HP GDP_Trend GDP_gain GPD_angular)
    1 1990 "United Kingdom"    30.468    16.809 1093169389204.55   12594491392 1.0805749e+12 .0394041 .28559932
    1 1991 "United Kingdom"    30.468    16.809 1142797178130.51   38082850816 1.1047143e+12 .3865072 .57119864
    1 1992 "United Kingdom"   28.6106 13.403038 1179659529659.53   48790659072 1.1308689e+12 .7486191   .856798
    1 1993 "United Kingdom"      27.9      12.1 1061388722255.55 -105758187520 1.1671469e+12 .8952165 1.1423973
    1 1994 "United Kingdom"      27.9      12.1 1140489745944.29  -88973582336 1.2294634e+12 .9484286 1.4279966
    1 1995 "United Kingdom"      27.9      12.1    1341584345905   24772661248 1.3168117e+12 .9702576  1.713596
    1 1996 "United Kingdom"      27.9      12.1 1415358814352.57    1409031680   1.41395e+12 .9804248 1.9991953
    1 1997 "United Kingdom" 14.663176  5.227907 1559078258022.27   49479213056  1.509599e+12  .985604 2.2847946
    1 1998 "United Kingdom"     8.072     1.806 1650172242464.39   5.74659e+10 1.5927063e+12 .9883389  2.570394
    1 1999 "United Kingdom"     8.072     1.806 1682399288141.08   22264080384  1.660135e+12 .9896897  2.855993
    1 2000 "United Kingdom"     8.072     1.806 1657816613708.58  -60127121408 1.7179438e+12  .990099  3.141593
    2 1990 "United States"       29.4      14.9     5.963144e+12   84337139712  5.878807e+12 .0394041 .28559932
    2 1991 "United States"       29.4      14.9     6.158129e+12  -39289442304  6.197419e+12 .3865072 .57119864
    2 1992 "United States"       29.4      14.9     6.520327e+12   -9196966912  6.529524e+12 .7486191   .856798
    2 1993 "United States"  13.382143  .0375137     6.858559e+12  -23772067840  6.882331e+12 .8952165 1.1423973
    2 1994 "United States"       12.5     -.781     7.287236e+12   25660139520  7.261576e+12 .9484286 1.4279966
    2 1995 "United States"       12.5     -.781     7.639749e+12  -29441933312  7.669191e+12 .9702576  1.713596
    2 1996 "United States"       12.5     -.781     8.073122e+12  -38092492800  8.111215e+12 .9804248 1.9991953
    2 1997 "United States"   8.977967 1.3458682    8577554463000  -11419578368  8.588974e+12  .985604 2.2847946
    2 1998 "United States"      8.784     1.463    9062818211000  -34884067328  9.097702e+12 .9883389  2.570394
    2 1999 "United States"      8.784     1.463    9630664202000    -140565792  9.630805e+12 .9896897  2.855993
    2 2000 "United States"      8.784     1.463   10252345464000   76239831040 1.0176106e+13  .990099  3.141593
    end
    format %ty ts
    ------------------ copy up to and including the previous line ------------------


  • #2
    Anyone on this please?

    Comment


    • #3
      I think it is very unclear what you want to do.

      In simple words, I have to create a new independent variable for each indicator in each period for which the current GDP is equal to the potential or the difference is minimized. Each indicator is independent and does not affect the other.
      Are you saying you want to detrend the data? It's not clear at all.

      Comment


      • #4
        Originally posted by Jackson Monroe View Post
        I think it is very unclear what you want to do.



        Are you saying you want to detrend the data? It's not clear at all.
        I am having a macro panel from for a number of countries with solid macro variables, dummies and some custom quality indicators I created as part of the project. According to my model, each indicator definitely determine macro variables.

        I am looking for a code/program to create stochasticaly a new variable continue and discrete for each of the indicator(s) values separtly and for each period that subject to the indicator GDP can be brought to steady state, all terms equal .

        In other words find the stochasticaly optimized value in every period for each of the indicators i.e indicator1 such that for those value bring actual GDP to steady state(potential output),estimated with hp filter.. Or at least minimize at most the cyclac component
        It is stochastic optimization problem with generating of a new variable
        ​​​​​​​I hope now is more clear
        Last edited by Giorgio Di Stefano; 07 Oct 2021, 04:10.

        Comment


        • #5
          Since this post got referred to from another post where you asked for help, here is my take. Like others here, I don't understand what you're asking. Generally, maximum likelihood implies a statistical model for a dependent variable as predicted by independent variables. It doesn't involve creating new values for the parameters - keep in mind that these are the parameters for the average effects of the IVs on the DV.

          I guess one question to ask yourself is, what is the statistical model you are trying to estimate? For example, you could use ordinary least squares to regress current GDP on indicator 1 and indicator 2. The parameters you get there would describe the average effect of indicator 1 on current GDP. (OLS is, I believe, a specific case of maximum likelihood estimation or MLE.) It's not clear what your dependent variable is. It's not clear what your independent variables are.

          I am looking for a code/program to create stochastically a new variable continuous(?) and discrete for each of the indicator(s) values separately...
          This is not what MLE does. It's not about creating new variables, or creating new values of existing variables. Perhaps you did mean something more like you want to estimate parameters that (if I read post #1 correctly) minimize the difference between current GDP and potential GDP? If so, again, you need a statistical model for that to have MLE. Or perhaps you are asking what sort of statistical model applies to that case, in which case you could clarify the question.
          Last edited by Weiwen Ng; 13 Oct 2021, 14:57.
          Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

          When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

          Comment


          • #6
            Originally posted by Weiwen Ng View Post
            Since this post got referred to from another post where you asked for help, here is my take. Like others here, I don't understand what you're asking. Generally, maximum likelihood implies a statistical model for a dependent variable as predicted by independent variables. It doesn't involve creating new values for the parameters - keep in mind that these are the parameters for the average effects of the IVs on the DV.

            I guess one question to ask yourself is, what is the statistical model you are trying to estimate? For example, you could use ordinary least squares to regress current GDP on indicator 1 and indicator 2. The parameters you get there would describe the average effect of indicator 1 on current GDP. (OLS is, I believe, a specific case of maximum likelihood estimation or MLE.) It's not clear what your dependent variable is. It's not clear what your independent variables are.



            This is not what MLE does. It's not about creating new variables, or creating new values of existing variables. Perhaps you did mean something more like you want to estimate parameters that (if I read post #1 correctly) minimize the difference between current GDP and potential GDP? If so, again, you need a statistical model for that to have MLE. Or perhaps you are asking what sort of statistical model applies to that case, in which case you could clarify the question.
            I Have opened a new thread with a sample of data here https://www.statalist.org/forums/for...-potential-gdp

            No intention of spamming.

            Comment

            Working...
            X