Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Corrgram and values saved in r()

From   Tomas Lind <>
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.


Tomas Lind
Stockholm County Council
Karolinska Institutet
*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index