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
Sensitivity Check of Longitudinal MediationDear all, I run a linear model to test for a mediation (outcome and mediator are both metric, the t…
Analyze data on Continuous Glucose Monitoring or Flash Glucose Monitoring in various Diabetes TechnologiesHello Everyone, hope you all are safe and healthy I have been trying to analyze CGM/FGM data for t…
Include all contrasts of categorical IV in margins after mlogitHi! I would like to visualize all contrasts of a categorical IV in an mlogit model, but am stuck on…
pstest interpretation after propension score matchingArray Dear, I make propension score matching estimation and I got these results. Do you think my est…
big panel data managementHi, I am struggling to manage my large panel dataset 300k observation over 36 months. I would be gra…
Subscribe to:
Post Comments (Atom)
0 Response to Trend analysis
Post a Comment