Announcement

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

  • Trend analysis

    I am interested in comparing a linear trend model with 1) power trend, 2) exponential trend, and 3) logarithmic trend models - comparing models using estimated AIC and BIC to identify the one that best fits my data.

    I had a play with a sample dataset and wanted to make sure my models are well specified - grateful for any comment/suggestion for improvement:

    clear
    use http://www.stata-press.com/data/r16/friedman2.dta

    * Create a time variable - rather than using the existing one (yearquarter)
    g timen = _n

    * Log variables
    g ln_consum = log(consump)
    g ln_time = log(timen)

    * Linear trend model
    regress consum timen
    estat ic

    * Exponential trend model
    regress ln_consum timen
    estat ic

    * Power trend model
    regress ln_consum ln_time
    estat ic

    * Logarithmic trend model
    regress consum ln_time
    estat ic
Working...
X