Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Corrgram and values saved in r()
From
Tomas Lind <[email protected]>
To
[email protected]
Subject
st: Corrgram and values saved in r()
Date
Thu, 14 Mar 2013 11:03:29 +0100
Hi Statalisters
I can´t read all the information in the r-memory when using -corrgram-.
In the dataset below I calculate the PAC for the first 20 lags. These can be seen in the graph and from the -matrix list-. It also works fine to look at r(pac1) up till r(pac10) but I can´t get the r(pac11)!
webuse air2 , clear
tsset t
corrgram air, lags(20)
matrix list r(PAC)
di r(pac1)
di r(pac10)
di r(pac11)
I want to sum the absolut value of all PAC´s up to lag 20 and I tried to do it this crude way (but it only works if I stop at lag 10):
di "Summa" abs(r(pac1)) + abs(r(pac2)) + abs(r(pac3)) + abs(r(pac4)) + abs(r(pac5)) + ///
abs(r(pac6)) + abs(r(pac7)) + abs(r(pac8)) + abs(r(pac9)) + abs(r(pac10)) + ///
abs(r(pac11)) + abs(r(pac12)) + abs(r(pac13)) + abs(r(pac14)) + abs(r(pac15)) + ///
abs(r(pac16)) + abs(r(pac17)) + abs(r(pac18)) + abs(r(pac19)) + abs(r(pac20))
Any ideas howe to fix this?
I´m using Stata 11.1 on Windows.
Yours
Tomas
Tomas Lind
Stockholm County Council
Karolinska Institutet
Sweden
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/