Announcement

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

  • Semiparametric smooth-coefficient (SPSC) production function

    I have cross-section data on 1,000 households. I need to estimate a semiparametric smooth-coefficient (SPSC) Cobb-Douglas production function using this data. The dependent variable is gross returns, which is a function of land and labor inputs. In addition, I have 3 risk-related variables that enter the production function in some unspecified nonlinear way. The related paper that I am following is here.
    I am new to the SPSC model and am trying to follow the VC_PACK: Stata module for the estimation of smooth varying coefficient models by FernandoRios . However, using the vc_reg command, I can only specify one varying coefficient, not all 3 of my risk-related variables.
    How can I estimate an SPSC Cobb-Douglas production function with 3 risk-related variables entering the function in a nonlinear way? Is there a way to extend the vc_reg command to handle multiple varying coefficients? Or is there another Stata module or approach I should consider for this type of semiparametric estimation problem?
    Any guidance on the Stata commands would be greatly appreciated. Thank you!

  • #2
    Hi Aisha
    Partially extending my package is easy. If you read the paper (Stata journal) or the references in the helpfile you will see that you only need to estimate linear models ( first order approximations) and use weighted regressions. In this case the weights are the product of three kernel functions.
    the hardest part it’s the bandwidth calibration. I do that using one parameter and the solution is easy to obtain. But for more parameters (3 in your case) you would need to program it yourself. Or estimate a model manually calibrating those bandwidths.
    hth

    Comment


    • #3
      FernandoRios thank you very much for your reply.
      As suggested I have gone through the Stata paper.
      At this point I am still trying to work with vc_reg as in the help file but have not made much progress.
      Is it possible for me to estimate my model manually as you suggest?


      Below is how my data looks like and the code i am trying to use.

      Code:
      * Example generated by -dataex-. For more info, type help dataex
      clear
      input long Returns double Land float Labour str2 Risk_1 byte Risk_2 double Risk_3
       150000    4   22 "3" 3 30
       250000    6   60 "6" 5 16
       100000    7   25 "3" 4  9
        60000    4   30 "3" 4 10
       700000   15  300 "3" 3 25
       200000    4   85 "4" 4 30
       300000    5   50 "6" 5 25
       700000   20  280 "1" 4 30
      1200000   18  200 "6" 5 15
       295000   14  265 "6" 4 18
        40000    3    0 "6" 3 18
      1000000   20    4 "1" 3 15
       280000   40  750 "6" 4 17
      3000000   40  750 "6" 4 20
        45000    7   10 "6" 4 25
       140000   10   15 "4" 3 20
       150000   60   25 "1" 2  5
        80000  2.6    0 "2" 2 10
       400000    5    0 "2" 2 16
       280000    4    0 "1" 3  6
       400000    9  100 "3" 3 10
      1250000   10   30 "2" 3 15
      2200000   40  500 "3" 4 15
       300000    9   40 "2" 2 10
       800000   29    8 "3" 3  6
       900000   23  500 "6" 5 28
       600000 12.5  140 "6" 5 22
      2000000   40 2490 "3" 3 15
      1200000   45 1500 "2" 2  8
       400000   40 1500 "1" 1 35
       700000   15  150 "1" 2  3
       600000    7  120 "4" 3 22
      1200000    6  100 "2" 3 23
      2500000   23   13 "3" 4 10
       900000   13  100 "6" 5 15
      2700000 59.4   12 "3" 3 10
      1400000   50   20 "2" 3  8
       500000   19   10 "1" 3 20
       300000   30    5 "3" 3 21
       800000   36    6 "4" 3 25
       150000    7    5 "4" 3 37
       500000   20 1500 "6" 5  6
       500000   24  200 "2" 3 19
       800000    5   10 "3" 3  3
       500000    8  400 "1" 1  4
       600000   21  400 "2" 3 10
       600000    8   25 "2" 2  3
       600000    7  160 "1" 2 14
       800000   10  750 "1" 1 10
      1500000   30 1400 "6" 4 24
       400000    7  550 "1" 2  9
       400000    7  280 "1" 2 12
        40000   12  140 "5" 3 30
       400000   18  200 "6" 4  9
       650000   20    7 "3" 3  8
       350000   15    3 "1" . 50
       600000   17    8 "3" 3  2
       200000  2.5   20 "1" 2  2
       100000   20  800 "4" 3  6
      4500000    4    8 "2" 3  7
       450000    8   25 "3" 4  5
      4900000  160 2460 "1" 3  5
        20000   60 1800 "1" 1 15
       800000   28  170 "2" 2 22
       300000    5   27 "1" 1  5
        80000   10 2500 "1" 2  7
       120000   60    8 "1" 2  5
      5000000   30 1000 "1" 1 25
       200000   13   70 "6" 5 10
        25000   10  400 "6" 5  6
      1200000   80  150 "6" 5 25
       125000    6   50 "6" 4  6
       100000    8  120 "3" 3 16
       120000   15  200 "3" 2  3
       177000   15   25 "6" 5 15
      2000000   40 1200 "5" 2  2
      3200000   55  160 "3" 3  2
       350000   29    0 "1" 3  4
       200000   80  800 "6" 5 49
       300000   14   60 "3" 2 17
        40000    7   35 "1" 1 13
       300000   10   90 "3" 2 25
       500000   40  870 "1" 1 18
       700000   30  500 "1" 3 11
      1000000   20    3 "2" 2  5
       600000   40  480 "3" 2 10
      1200000   40  500 "2" 2 25
       800000   56    5 "3" 3 40
       800000   30    5 "2" 2 16
       500000   25   50 "1" 1  4
      3000000  160 2000 "6" 4 15
      5000000  240 4000 "2" 2 14
       400000   18  500 "1" 1 21
       200000    8  200 "6" 5  9
      3000000   66   55 "6" 4 20
      5000000   80   15 "4" 3  8
       100000   10   60 "1" 2 10
       500000   30  900 "3" 3 20
      2300000   57 1080 "6" 5 35
       900000   60 1800 "6" 5 21
      end


      Code:
      local Output Returns
                  local Inputs Land Labour
                  local Risk Risk_1 Risk_2 Risk_3 
                  vc_reg `Output' `Inputs', vcoeff(`Risk')
                  
                  I get the error 
                  vcoeff():  too many variables specified














      Comment


      • #4
        yes, again, modeling is easy, putting it together is the hard part
        step 1: Create the weights

        gen ww = normalden(var1,value,sd)*normalden(var2,value,h2)* normalden(var3,value,h3)

        This just creates the weights for a combination of three points across those 3 variables of yours

        You need to select h's to be appropriate

        then make the regression. Something like
        reg y kapital labor s_else [iw = ww], robust

        Then just go in collecting all the coefficients for all points of interest that combines Var1 Var2 Var3. (a 3d matrix of sorts)

        that's it for the basic approach. A more complex approach is just setting an optimization for the bandwidths.

        Comment


        • #5
          FernandoRios thank you once again for your reply.
          I will follow these steps along with the help files.





          Comment

          Working...
          X