Statalist


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

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


From   "Austin Nichols" <[email protected]>
To   [email protected]
Subject   Re: st: Has the time trend resulted in a 2/3 reduction between year ?? and year ??, can Stata tell you yes or no. (fwd)
Date   Fri, 18 Jan 2008 12:37:48 -0500

Daniel Wilde <[email protected]>:
Something is wrong with your mail server or client software.  Both of
these messages appear to have been sent within one second of each
other, as you can see at:
http://www.stata.com/statalist/archive/2008-01/

You can do all this within Stata, though it is not clear to me that it
is a good idea.  Try this (untested) approach for starters:

g a=.
g b=.
g p=.
levelsof country, loc(c)
foreach i of local c {
 qui reg data301 time if country==`i'
 replace p=2*ttail(e(df_r),abs(_b[time]/_se[time]))  if country==`i'
 su time if time==1990 & e(sample), meanonly
 if r(N)==0 {
 replace time=1990  if country==`i'
 predict A  if country==`i'
 }
 else g A=data301 if country==`i'
 replace time=2015 if country==`i'
 predict B if country==`i'
 replace a=A  if country==`i'
 replace b=B  if country==`i'
 drop A B
}
bys country: drop if _n>1
keep country p a b
g c="no significant trend" if p>0.1
replace c="significant upward trend" if b>a & p< 0.1
replace c="significant downward trend" if b<a & p< 0.1 & b > a/3
replace c="achieved 2/3 reduction" if p<.1 & b < a/3
list, noo clean

On Jan 18, 2008 9:10 AM, Daniel Wilde <[email protected]> wrote:
> All,
>
> I just thought I would repost the below message because I didn't get any
> responses yesterday. Is there anything about it that's unclear? Or is it
> just a boring question?
>
> Kind Regards,
>
> Daniel Wilde
>
> ------------ Forwarded Message ------------
> Date: 16 January 2008 19:37 +0000
> From: Daniel Wilde <[email protected]>
> To: [email protected]
> Subject: Has the time trend resulted in a 2/3 reduction between year ?? and
> year ??, can Stata tell you yes or no.
>
*
*   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