Announcement

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

  • Compare coefficients of lagged independent variables across two regression models

    Hello everyone,

    As part of my master's thesis, I am measuring the effect of the total number of AI professors on AI patent grants within US counties. I am using a random effects panel regression with years from 2000 to 2020, standard errors clustered at the county level.

    As part of the thesis, I hypothesise that the effect of professors on patents becomes stronger after several years.
    Therefore, I want to test the effect of the independent variable (professors) with different time lags, i.e. 0, 3, 5, 7 and 9 years, and see when it is the strongest.
    Since the independent variable has the same metric in each model (=number of professors), is it possible to simply compare the effects across models? I have already tried the regression with the original and standardised independent variables, which gave the same results that the effect is strongest after 7 years.

    I am sorry if this question might sound silly to you, but I have not been able to find literature that has helped me with this exact question regarding time lags.

    Thank you a lot in advance!
    Kind regards
    Carla


  • #2
    Carla:
    welcome to this forum.
    I reply to your question via tyhe following toy-example:
    Code:
    . use "https://www.stata-press.com/data/r18/nlswork.dta"
    (National Longitudinal Survey of Young Women, 14-24 years old in 1968)
    
    . xtreg ln_wage i.year L2.grade L3.grade, re vce(cluster idcode)
    note: L3.grade omitted because of collinearity.
    
    Random-effects GLS regression                   Number of obs     =      5,798
    Group variable: idcode                          Number of groups  =      2,583
    
    R-squared:                                      Obs per group:
         Within  = 0.1110                                         min =          1
         Between = 0.2502                                         avg =        2.2
         Overall = 0.1922                                         max =          6
    
                                                    Wald chi2(6)      =    1102.92
    corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0000
    
                                 (Std. err. adjusted for 2,583 clusters in idcode)
    ------------------------------------------------------------------------------
                 |               Robust
         ln_wage | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
            year |
             72  |  -.0006183   .0112874    -0.05   0.956    -.0227412    .0215046
             73  |   .0090073   .0124871     0.72   0.471     -.015467    .0334817
             75  |  -.0192709   .0133118    -1.45   0.148    -.0453615    .0068197
             80  |   .0791781   .0146177     5.42   0.000      .050528    .1078283
             85  |   .1821825   .0156395    11.65   0.000     .1515295    .2128354
                 |
           grade |
             L2. |   .0848134    .003201    26.50   0.000     .0785396    .0910872
             L3. |          0  (omitted)
                 |
           _cons |   .6010253    .040907    14.69   0.000      .520849    .6812015
    -------------+----------------------------------------------------------------
         sigma_u |  .30883404
         sigma_e |  .23925736
             rho |  .62493035   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    
    . test L2.grade=L3.grade
    
     ( 1)  L2.grade - oL3.grade = 0
    
               chi2(  1) =  702.05
             Prob > chi2 =    0.0000
    
    .
    In addition, I would consider interactng time with -professors- (provided that I'm right in guessing that -professors- is the predictor you're most interested in).
    See -fvvarlist- notation for interactions and categorical variables.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment

    Working...
    X