Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Has the time trend resulted in a 2/3 reduction between year ?? andyear ??, can Stata tell you yes or no.


From   Daniel Wilde <[email protected]>
To   [email protected]
Subject   st: Has the time trend resulted in a 2/3 reduction between year ?? andyear ??, can Stata tell you yes or no.
Date   Wed, 16 Jan 2008 19:37:52 +0000

All,

I hope this email finds you well. Here goes:

I am estimating time trends in countries rates of X (the dependent variable). I am doing this using:

by country: reg data301 time

It works. Please note time is just the year e.g. 1986. But now I want to estimate if variable X was reduced by two thirds between 1990 and 2015. The year and length of the time series data varies by country. So Sierra Leone might have 10 years of data starting in 1975 and ending in 1985. And UK might have 15 years of data starting in 1970 and ending in 1985. Some countries also have missing years, e.g. data exists for 1973 to 1980 and then 1983 to 1990. I have worked this out for each country in Excel by

1) estimating the value for 1990 = intercept + 1990*coefficient on time.
2) making A = the actual value for 1990 is it exists and the estimated value for 1990 if it does not.
3) predicting the value for 2015 as B = intercept + 2015 * coefficient on time.
4) outputting 1) "no significant trend" if the p-value for time is >0.1 2) "significant upward trend" if the coefficient on time is positive and its p-value is < 0.1 3) "significant downward trend if the coefficient on time is negative and its p-value is < 0.1 but B > 1/3A 4) "achieved 2/3 reduction" if the p-value on time is significant and B < 1/3A.

I can do this in Excel. But my method involves typing our the results from STATA and then using if functions. Which is very time consuming. So how can I do all this in Stata? Please note, that I would also want to repeat this for a lin log and log lin regressions. I hope this all makes sense. Many thanks in advance for any help.

Kind Regards,

Daniel Wilde

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index