Announcement

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

  • Need help on the Margins and marginsplot

    Dear experts,

    I am a beginner of Stata and I need your help desperately.
    I have the panel data from 2010~2019 and I used the pooled regression shown below.

    Source SS df MS Number of obs = 153
    F(15, 137) = 1165.07
    Model 1699562.56 15 113304.171 Prob > F = 0.0000
    Residual 13323.3706 137 97.2508804 R-squared = 0.9922
    Adj R-squared = 0.9914

    DeltaEVs Coef. Std. Err. t P>t [95% Conf. Interval]
    GDPpercapitaUS -.0000819 .0000563 -1.46 0.148 -.0001932 .0000294
    Populationdensitypeoplepers -.0462512 .0068914 -6.71 0.000 -.0598786 -.0326239
    CO2Mtonyear .0013372 .0004983 2.68 0.008 .0003519 .0023225
    SubAmount .0018927 .0004078 4.64 0.000 .0010863 .0026992
    PFastcharger .0035526 .0002095 16.96 0.000 .0031383 .0039668
    PSlowcharger .0011595 .0001116 10.39 0.000 .0009388 .0013803

    I want to transform this data into a semi-log by putting logs on both sides and I want to observe the changes while all the variables increase 1% from 2010 until 2040.
    As a final result, I want to draw ONE graph from 2010 to 2040 as in a log-linear graph using Margins and marginsplot.
    (X axis: 2010 ~ 2040, Y axis: DeltaEVs, log-linear graph affected by 6 variables)

    Can someone tell me how I should do? I have attached my commands as well.

    ################################################## ##################
    reg DeltaEVs GDPpercapitaUS Populationdensitypeoplepers CO2Mtonyear SubAmount PFastcharger PSlowcharger

    gen LNDeltaEVs = ln( DeltaEVs +1 )
    gen LNGDPpercapitaUS = ln( GDPpercapitaUS +1)
    gen LNPopulationdensitypeoplepers = ln( Populationdensitypeoplepers +1)
    gen LNCO2Mtonyear = ln( CO2Mtonyear +1)
    gen LNSubAmount = ln( SubAmount +1)
    gen LNPFastcharger = ln( PFastcharger +1)
    gen LNPSlowcharger = ln( PSlowcharger +1)


    margins, ???????

    ################################################## #############

    Your quick feedback would be greatly appreciated.
    Best,
    Last edited by Jason Insu Park; 06 Jun 2021, 19:11.
Working...
X