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
Related Posts with Trend analysis
Create scale break in coefplotHi everyone, I am trying to graph the coefficients I generated from a multilevel linear regression …
individual log likelihoods using -frontier for Vuong testHi, I am looking to run a Vuong test to compare model specification after using the -frontier comman…
Loop over files and rename variable with dataset nameHi there, I have multiple .dta datasets and they all contain the same variable labeled "Q". I want …
Loop over files and rename variable with filenameHi there, I have multiple .dta datasets and they all contain the same variable labeled "Q". I want …
Tobit model in cmp -- marginal effect on probability of positive outcomeHi all, I am trying to estimate the marginal effect of the regressors on the probability of an unce…
Subscribe to:
Post Comments (Atom)
0 Response to Trend analysis
Post a Comment