Announcement

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

  • Regression with a time trend

    Hello everybody, I´m using Stata 18, and I'm trying to make a regression with a time trend analysis. Could someone help me and tell me what is the command or code to make this analysis? I've founded this example, and I tried to introduce the code as there, but it throws me "error" or "unrecognized". Please, could someone tell me the correct code or command to make this analysis? Thanks.
    Click image for larger version

Name:	1.jpg
Views:	1
Size:	46.3 KB
ID:	1731581


  • #2
    Xavier:
    without more details about the error you received from Stata and an excerpt of your dataset (see -dataex-), the following reply is based on my guess-work.
    Usually, when time is considered as a continous variable (see -fvvvarlist- notation), it is frequent to search from a turning point (that is, a non-linear relationship between time and the regressand, that may have a minimum or a maximum).
    If this is what you're after, you can code:
    Code:
    reg l_emp minimum_wage c.time##c.time
    Otherwise, you can interact -miminum_wage- with -time-:

    Code:
    reg l_emp c.minimum_wage##c.time
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment

    Working...
    X