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

  • which regression supposed to be used for temperature bins panel data in stata (non-parametric regression)?

    I have been stuck with the issue of determining which regression supposed to be used temperature bins' panel data. In my first attempt, I intend to run spline regression on my data by using mkspline, can't work for me. I am wondering which regression supposed to work on temperature bin panel data. Perhaps using baseline regression, or smoothing spline, or restricted cubic spline could work.

    Here is the general picture of my panel data specification: at the first row shown below are my dependent variables which presented in natural log terms and independent variables: average temperature, total precipitation and 11 temperature bins and each bin-width (AKA, bin's window) is 3-degree Celsius. (<-6, -6~-3,-3~0,...>21).

    Basically, I want to fit split regression on my data (let's say, choose one dependent variable such as ln_gdp_percapita, and multiple independent variables such as bin1 ~ bin10), I want to see the spline regression can fit better on my panel data.

    I tried very basic regression on this temperature bin' panel data, here is the stata command down below:

     xtreg ln_gva_agr_per_worker  bin4 bin5 bin6 bin7 bin8 bin9 bin10 bin11 i.year, fe
    In general, I want to see how agriculture or industry sectors respond to daily temperature. So running a simple regression on temperature bin panel data is not sufficient to reach a conclusion. I believe restricted spline regression/smoothing spline or baseline regression might produce better estimation.

    Here is example data snippet down below;

    My question is fairly straightforward, which regression can be used for temperature bin' panel data? Any basic demo Stata command to see regression output for temperature panel data?

    Here is the general picture of my desired output:

    b_h b b_l st error t_stat p-value
    bin1 (-23.87:-18.44) -0.0129 -0.0306 -0.0483 0.009026 -3.39 0.001
    bin2 (-18.44:-13.02) -0.0050 -0.0096 -0.0141 0.002334 -4.1 0
    bin3 (-13.02:-7.59) -0.0040 -0.0057 -0.0075 0.00089 -6.44 0
    bin4 (-7.59:-2.17) 0.0030 0.0021 0.0011 0.000492 4.23 0
    bin5 (-2.17:3.26) -0.0007 -0.0012 -0.0018 0.000278 -4.48 0
    bin6 (3.26:8.69) 0.0000 0.0000 0.0000
    bin7 (8.69:14.11) 0.0008 0.0001 -0.0005 0.00035 0.41 0.681
    bin8 (14.11:19.54) 0.0010 0.0000 -0.0010 0.000511 0.06 0.956
    bin9 (19.54:24.96) 0.0028 0.0016 0.0005 0.000574 2.85 0.004
    bin10 (24.96:30.39) -0.0031 -0.0057 -0.0083 0.001308 -4.36 0
    here is the graph that I want to produce in Stata:
    Click image for larger version

Name:	hola.PNG
Views:	2
Size:	10.8 KB
ID:	1448829

    in this plot, black point line is estimated regression (either baseline or restricted spline regression) coefficient, and dot blue line is 95%confidence interval based on clustered standard errors.

    Is there anyone suggest me which regression model I can use for temperature bin' panel data? Any solid idea? Thanks
    Attached Files
    Last edited by Jurat Shahidin; 13 Jun 2018, 08:39.

  • #2
    Anyone knows how to run a semiparametric regression on panel data? Any clue for running a possible regression on that? Any idea?


    • #3
      You didn't get a quick answer. You'll incraese your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex. Also, many of us won't open attached files.

      If you want to assume things are constant within bins, you can simply do a regression on dummies using factor variable notation. You can have fixed effects either by setting the data as panel using xtset and using xtreg, fe or by using regression with i.panel as a control. Beyond that, you need to explain your problem more clearly. Its not clear to me what semiparameteric regression means, etc.