On Thu, Mar 14, 2013 at 11:03 AM, Tomas Lind wrote:
> I want to sum the absolut value of all PAC's up to lag 20
*------------------ begin example ------------------
webuse air2 , clear
tsset t
corrgram air, lags(20)
mata
st_numscalar( "abs_sum", sum(abs(st_matrix("r(PAC)"))) )
end
di abs_sum
*------------------- end example -------------------
(For more on examples I sent to the Statalist see:
http://www.maartenbuis.nl/example_faq )
Hope this helps,
Maarten
---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany
http://www.maartenbuis.nl
---------------------------------
*
* 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/