From ???@??? Wed Mar 08 09:29:36 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id CAA12796 for ; Wed, 8 Mar 2000 02:30:11 +1100 Message-Id: <200003071530.CAA12796@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Wed, 08 Mar 2000 02:30:11 +1100 (EETDT) Received: from SpoolDir by EFS01 (Mercury 1.40); 8 Mar 100 02:19:30 GMT+1000 From: Vivek Ghosal To: "RATS Discussion List" Subject: Panel data Date: Tue, 7 Mar 2000 10:15:00 -0500 Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: X-Mailer: Worldtalk (NetJunction 4.6-p7)/MIME (via Mercury MTS (Bindery) v1.40) Hello- I have a panel data set with (cross-section) N=332 and (years) T=37. The cross-section units have an ID with non-consecutive values from 1011 to 4500. I want to estimate a regression for each cross-section unit (as opposed to panel estimation). How do I write the *DO* or *DOFOR* command given that the cross -section ID values are non-consecutive? (Being a new RATS user, I*m unsure.) Thanks a lot. Vivek From ???@??? Wed Mar 08 09:30:25 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id EAA08650 for ; Wed, 8 Mar 2000 04:00:04 +1100 Message-Id: <200003071700.EAA08650@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Wed, 08 Mar 2000 04:00:04 +1100 (EETDT) Received: from SpoolDir by EFS01 (Mercury 1.40); 8 Mar 100 03:46:25 GMT+1000 From: "Estima" To: "RATS Discussion List" Subject: Re: Panel data Date: Tue, 7 Mar 2000 10:34:05 -0600 Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: Organization: Estima MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT X-mailer: Pegasus Mail for Win32 (v3.11) (via Mercury MTS (Bindery) v1.40) > I have a panel data set with (cross-section) N=332 and (years) T=37. > The cross-section units have an ID with non-consecutive values from > 1011 to 4500. I want to estimate a regression for each cross-section unit > (as opposed to panel estimation). > > How do I write the *DO* or *DOFOR* command given that the cross > -section ID values are non-consecutive? (Being a new RATS user, I*m > unsure.) First, when you say "regression for each cross-section", I assume you mean that you want to do a regression using the 37 data points for one individual (e.g., ID # 1011), then a separate regression using the 37 data points for another individual (e.g., ID # 4500), and so on? If so, and if you don't care about the order in which the regressions are done (that is, you want to do a regression for each ID #, but don't care about the order in which the regressions are done), just use DO to walk through the whole data set: compute numind = 332 compute numper = 37 do start=1,numper*numind,37 linreg depvar start start+36 # regressors ... end do If you do want to do the regressions in ID # order, there are probably a lot of ways to go about that. The ideal situation would be if you have a series containing the ID #'s, such that each observation for a given individual contains the ID # for that individual. If so, just sort on the ID #'s and do your estimation. If you don't have lags in the model (and thus it doesn't matter where the time periods fall within each inidividual), just sort on the ID #'s, being sure to sort your dependent variable and all regressors allong with the data. You should also define an "index" series so you can "unsort" the data later: set index = t order idnums / y x1 x2 x3 index do start=1,numper*numind,37 linreg y start start+36 # x1 x2 x3 ... end do order index / idnums y x1 x2 x3 If you do have lags, and thus need to preserve the ordering of the time periods, you need to create a sort key that includes botht he ID info and the period index. You can do that by multiplying the ID series by a scale factor and adding a period index: set period = %period(t) set sortkey = idnums*100 + period print / sortkey idnums period ENTRY SORTKEY IDNUMS PERIOD 1//01 101101.00000000 1011.0000000000 1.000000000000 1//02 101102.00000000 1011.0000000000 2.000000000000 1//03 101103.00000000 1011.0000000000 3.000000000000 1//04 101104.00000000 1011.0000000000 4.000000000000 1//05 101105.00000000 1011.0000000000 5.000000000000 1//06 101106.00000000 1011.0000000000 6.000000000000 1//07 101107.00000000 1011.0000000000 7.000000000000 etc. Then do: order sortkey / idnums period index y x1 x2 x3 do start=1,numper*numind,37 linreg y start start+36 # x1 x2 x3 ... end do order index / sortkey idnums period y x1 x2 x3 Sincerely, Tom Maycock -- ------------------------------------------------------------ | Estima | Sales: (800) 822-8038 | | P.O. Box 1818 | (847) 864-8772 | | Evanston, IL 60204-1818 | Support: (847) 864-1910 | | USA | Fax: (847) 864-6221 | | http://www.estima.com | estima@estima.com | ------------------------------------------------------------ From ???@??? Wed Mar 08 09:30:43 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id GAA17102 for ; Wed, 8 Mar 2000 06:50:05 +1100 Message-Id: <200003071950.GAA17102@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Wed, 08 Mar 2000 06:50:05 +1100 (EETDT) Received: from SpoolDir by EFS01 (Mercury 1.40); 8 Mar 100 06:46:01 GMT+1000 From: Alejandro Arrieta Herrera To: "RATS Discussion List" Subject: Re: Panel data Date: Tue, 07 Mar 2000 14:46:25 -0500 Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: X-Mailer: Mozilla 4.5 [es] (WinNT; I) (via Mercury MTS (Bindery) v1.40) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I have a Panel Data and I am trying to test cointegration. Do someone know how to test it? Alejandro Arrieta H. Superintendencia de Banca y Seguros From ???@??? Wed Mar 08 09:30:47 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id HAA14664 for ; Wed, 8 Mar 2000 07:15:04 +1100 Message-Id: <200003072015.HAA14664@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Wed, 08 Mar 2000 07:15:04 +1100 (EETDT) Received: from SpoolDir by EFS01 (Mercury 1.40); 8 Mar 100 07:12:35 GMT+1000 From: "Christopher F. Baum" To: "RATS Discussion List" Subject: Re: Panel data Date: Tue, 07 Mar 2000 15:12:35 -0500 Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: X-Mailer: Mulberry (MacOS) [1.4.5, s/n P020-300786-009] (via Mercury MTS (Bindery) v1.40) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Peter Pedroni @ Indiana U. has written RATS procedures to accomplish these tests. Kit Baum Boston College Economics --On Tue, Mar 7, 2000 14:46 -0500 Alejandro Arrieta Herrera wrote: > I have a Panel Data and I am trying to test cointegration. Do someone > know how to test it? > > Alejandro Arrieta H. > Superintendencia de Banca y Seguros > > > ----------------------------------------------------------------- Kit Baum baum@bc.edu http://fmwww.bc.edu/ec-v/baum.fac.html From ???@??? Fri Mar 10 09:28:15 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id JAA10242 for ; Thu, 10 Mar 1994 09:10:11 +1100 Message-Id: <199403092210.JAA10242@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Thu, 10 Mar 1994 09:10:11 +1100 (EETDT) Received: from SpoolDir by EFS01 (Mercury 1.40); 10 Mar 100 06:22:23 GMT+1000 From: "Bob Shain" To: "RATS Discussion List" Subject: RE: Equivalent of SAS 'by' statement in SAS procs Date: Thu, 9 Mar 2000 14:22:33 -0500 Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: MIME-Version: 1.0 Content-Type: text/plain; Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 (via Mercury MTS (Bindery) v1.40) I'm doing a panel data problem with rats and I need to do a regression separately for each member fo the panel. If I were doing this in SAS, I would do a 'proc reg' by panel and the output would come out in a file indexed by panel. How can I do this in RATS. Do I have to use 'do' instructions or is there a way more or less equivalent to the SAS language way? From ???@??? Fri Mar 10 09:28:45 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id JAA10336 for ; Thu, 10 Mar 1994 09:10:20 +1100 Message-Id: <199403092210.JAA10336@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Thu, 10 Mar 1994 09:10:21 +1100 (EETDT) Received: from SpoolDir by EFS01 (Mercury 1.40); 10 Mar 100 08:25:42 GMT+1000 From: "Estima" To: "RATS Discussion List" Subject: RE: Equivalent of SAS 'by' statement in SAS procs Date: Thu, 9 Mar 2000 15:18:56 -0600 Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: Organization: Estima MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT X-mailer: Pegasus Mail for Win32 (v3.11) (via Mercury MTS (Bindery) v1.40) > I'm doing a panel data problem with rats and I need to do a regression > separately for each member fo the panel. > > If I were doing this in SAS, I would do a 'proc reg' by panel and the output > would come out in a file indexed by panel. > > How can I do this in RATS. Do I have to use 'do' instructions or is there a > way more or less equivalent to the SAS language way? > Somebody asked almost exactly the same question a couple of days ago (March 7), and I provided a fairly lengthy answer. Check your mail from that date, or check the on-line archives. If you can't find it, let me know and I'll dig out my answer again. Tom Maycock Estima -- ------------------------------------------------------------ | Estima | Sales: (800) 822-8038 | | P.O. Box 1818 | (847) 864-8772 | | Evanston, IL 60204-1818 | Support: (847) 864-1910 | | USA | Fax: (847) 864-6221 | | http://www.estima.com | estima@estima.com | ------------------------------------------------------------ From ???@??? Fri Mar 10 09:59:21 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id JAA10738 for ; Thu, 10 Mar 1994 09:50:04 +1100 Message-Id: <199403092250.JAA10738@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Thu, 10 Mar 1994 09:50:04 +1100 (EETDT) Received: from SpoolDir by EFS01 (Mercury 1.40); 10 Mar 100 09:48:14 GMT+1000 From: Justin Maharaj To: "RATS Discussion List" Subject: Multiplicative Seasonality Date: Thu, 9 Mar 2000 14:44:42 -0800 (PST) Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Excite Inbox (via Mercury MTS (Bindery) v1.40) Is it possible, using RATS, to model multiplicative seasonal coefficients of the form: (1-aL)y = (1+B1L)(1+B4L^4)et where: B1 and B4 reads as B subscript 1 and 4 resp. and et as e subscript t (See Enders, W., 1995, Applied Econometric Time Series, pg. 111-113.) Justin Maharaj _______________________________________________________ Get 100% FREE Internet Access powered by Excite Visit http://freeworld.excite.com From ???@??? Sat Mar 11 09:46:31 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id UAA11492 for ; Thu, 10 Mar 1994 20:55:05 +1100 Message-Id: <199403100955.UAA11492@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Thu, 10 Mar 1994 20:55:05 +1100 (EETDT) Received: from SpoolDir by EFS01 (Mercury 1.40); 10 Mar 100 20:50:39 GMT+1000 From: George Semertzakis To: "RATS Discussion List" Subject: diagnostic tests Date: Fri, 10 Mar 2000 09:49:04 +0000 Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: Organization: Deptartment of Econ. & Finance X-Mailer: Mozilla 4.7 [en] (Win98; I) (via Mercury MTS (Bindery) v1.40) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-7 Content-Transfer-Encoding: 7bit Does RATS has any command to give you the diagnostic tests? I would like to have the Heteroscedasticity and the Serial Correlation, as well as the normality etc.. for my time series. In mean something like the Microfit that gives you these information at the bottom of the print out. George Semertzakis -- ----------------------------------------------------- George Semertzakis | Tel: +44(0)191-3741821 Dept.of Economics & Finance | University of Durham | Fax: +44(0)191-3747289 23/26 Old Elvet | Durham | P.C: DH1 3HY | UK |http://www.thehungersite.com/ ------------------------------------------------------ From ???@??? Sat Mar 11 09:47:01 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id XAA08176 for ; Thu, 10 Mar 1994 23:30:04 +1100 Message-Id: <199403101230.XAA08176@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Thu, 10 Mar 1994 23:30:04 +1100 (EETDT) Received: from SpoolDir by EFS01 (Mercury 1.40); 10 Mar 100 23:16:05 GMT+1000 From: Andreas Faust To: "RATS Discussion List" Subject: Re: Multiplicative Seasonality Date: Fri, 10 Mar 2000 04:16:16 -0800 (PST) Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mercury MTS (Bindery) v1.40 yes, look for example the HEGY.SRC which is a test for seasonal unit roots (available on www.estima.com). You can calculate this form of differences with the SET command for series. Andreas --- Justin Maharaj schrieb: > Is it possible, using RATS, to model multiplicative > seasonal coefficients of > the form: > > (1-aL)y = (1+B1L)(1+B4L^4)et > > where: > B1 and B4 reads as B subscript 1 and 4 resp. and et > as e subscript t > > (See Enders, W., 1995, Applied Econometric Time > Series, pg. 111-113.) > > Justin Maharaj > > > > > > _______________________________________________________ > Get 100% FREE Internet Access powered by Excite > Visit http://freeworld.excite.com > > ===== Andreas Faust Av. Carúpano N° 23 Qta. El Rosedal Las Palmas, Caracas Venezuela Tel.: +58 2 7818621 andreasfaust@yahoo.com __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com From ???@??? Sat Mar 11 09:47:42 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id DAA12284 for ; Fri, 11 Mar 1994 03:00:13 +1100 Message-Id: <199403101600.DAA12284@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Fri, 11 Mar 1994 03:00:13 +1100 (EETDT) Received: from SpoolDir by EFS01 (Mercury 1.40); 11 Mar 100 02:48:23 GMT+1000 From: "Estima" To: "RATS Discussion List" Subject: Re: Multiplicative Seasonality Date: Fri, 10 Mar 2000 09:51:10 -0600 Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: Organization: Estima MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT X-mailer: Pegasus Mail for Win32 (v3.11) (via Mercury MTS (Bindery) v1.40) > Is it possible, using RATS, to model multiplicative seasonal coefficients of > the form: > > (1-aL)y = (1+B1L)(1+B4L^4)et > > where: > B1 and B4 reads as B subscript 1 and 4 resp. and et as e subscript t That is in fact exactly how the SAR and SMA parameters work on the BOXJENK isntruction--see the formulation shown on page 14-12 in the manual. Sincerely, Tom Maycock Estima -- ------------------------------------------------------------ | Estima | Sales: (800) 822-8038 | | P.O. Box 1818 | (847) 864-8772 | | Evanston, IL 60204-1818 | Support: (847) 864-1910 | | USA | Fax: (847) 864-6221 | | http://www.estima.com | estima@estima.com | ------------------------------------------------------------ From ???@??? Sat Mar 11 09:47:56 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id DAA12866 for ; Sat, 11 Mar 2000 03:30:07 +1100 Message-Id: <200003101630.DAA12866@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Sat, 11 Mar 2000 03:30:07 +1100 (EETDT) Received: from SpoolDir by EFS01 (Mercury 1.40); 11 Mar 100 03:07:46 GMT+1000 From: "Vasquez Escobar Diego M." To: "RATS Discussion List" Subject: RE: diagnostic tests Date: Fri, 10 Mar 2000 11:04:06 -0500 Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) (via Mercury MTS (Bindery) v1.40) Content-Type: text/plain; You can use RATS to do a set of tests for Heteroscedasticity, autocorrelation and normality, take a glance at the RATS User's manual. However these are some examples of BREUSCH-PAGAN, WHITE, ARCH and BREUSCH-GOODFREY tests for Heteroscedasticity and autocorrelation: For Normality take a glance at www.estima.com There is a set of procedures that implement normality test such as KOLMTEST.SRC AND NORMTEST. SRC. *************************************************** * BREUSCH-PAGAN test for Heteroscedasticity * *************************************************** SET LDEP = LOG(DEPVAR) LINREG DEP / RESIDS # CONSTANT INDEP COMPUTE CHISTAT=%NOBS*%RSQUARED CDF CHISQR CHISTAT 1 SET RESSQR = RESIDS**2 LINREG(NOPRINT) RESSQR # CONSTANT INDEP COMPUTE CHISTAT=%NOBS*%RSQUARED CDF CHISQR CHISTAT 1 ******************************************** * WHITE TEST FOR Heteroscedasticity * ******************************************** LINREG DEPVAR / RESIDS # CONSTANT IND1 IND2 SET IND3 = IND1*IND1 SET IND4 = IND2*IND2 SET MIX = IND1*IND2 SET RESSQR = RESIDS**2 LINREG(NOPRINT) RESSQR # CONSTANT IND1 IND2 IND3 IND4 MIX COMPUTE CHISTAT=%NOBS*%RSQUARED CDF CHISQR CHISTAT 5 ******************************************** * Test ARCH para HETEROSCEDASTICIDAD * ******************************************** LINREG DEPVAR / RESIDS # CONSTANT IND1 IND2 SET RESSQR = RESIDS**2 LINREG(NOPRINT) RESSQR # CONSTANT RESSQR{1} COMPUTE CHISTAT=%NOBS*%RSQUARED CDF CHISQR CHISTAT 1 TO TEST FOR AUTOCORRELATION you can implement BREUSCH y GOODFREY and Ljung-Box tests. This is an example. *************************************************** * BREUSCH-GOODFREY test for AUTOCORRELATION * *************************************************** LINREG DEPVAR / RESIDS # CONSTANT IND1 IND2 LINREG(NOPRINT) RESIDS # CONSTANT PIB INF RESIDS{1 TO 4} CDF CHISQR %TRSQ 4 Exclude # resids{1 to 4} Good Luck From ???@??? Sat Mar 11 09:48:19 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id DAA12950 for ; Sat, 11 Mar 2000 03:30:15 +1100 Message-Id: <200003101630.DAA12950@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Sat, 11 Mar 2000 03:30:15 +1100 (EETDT) Received: from SpoolDir by EFS01 (Mercury 1.40); 11 Mar 100 03:23:52 GMT+1000 From: Simon van Norden To: "RATS Discussion List" Subject: Re: diagnostic tests Date: Fri, 10 Mar 2000 11:27:40 -0500 Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: Organization: Ecole des Hautes Etudes Commerciales X-Mailer: Mozilla 4.61 [en] (Win98; U) (via Mercury MTS (Bindery) v1.40) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit There is no good built-in function in RATS for this stuff. A friend and I programmed some residual-based diagnostic tests many years ago. You can still get the code (with some others) by following the links from my homepage. I've attached the relevant proc listing below. Hope this helps. Regards, SvN -- Simon van Norden, Prof. agrégé, www.hec.ca/pages/simon.van-norden Service de l'enseignement de la finance, École des H.E.C. 3000 Cote-Sainte-Catherine, Montreal QC, CANADA H3T 2A7 simon.van-norden@hec.ca or (514)340-6781 or fax:(514)340-5632 -- env noecho * * RESDIAG.SRC by Robert Amano and Simon van Norden 02-07-91 * Copyright 1993, 1991 by Bank of Canada * (modified for RATS v4 August 1993 by Jeff Gable) * * This procedure calculates a number of residual diagnostic tests * * The syntax for the procedure is * @RESDIAG(options) residuals * # list of series * # dependent_variable fitted_values * (the last card is used with the RESET option only) * * where * residuals = the name of the residual series * list of series = the variables used in your regression * * We assume that the list of regressors supplied by the user includes a CONSTANT * as the first series in the list. * * NOTE: that on the supplementary card you cannot use the usual RATS notation * for leads and lags (eg. X{0 to 2}). If you use leads or lags in your * model, you have two choices: * * 1. Turn the LM and Breusch-Pagan test off (ie NOLMP, NOBPHET) and * leave the reset test off. The procedure will still calculate all * other test statistics. * OR * 2. Code each one into a new unlagged variable, then list the new * variable on the supplementary card. Eg. set X1 = X(t-1) * etc. * @resdiag resid * # constant X X1 ... * options: * [PRINT]/NOPRINT Prints the series autocorrelations and partial- * autocorrelations up to LBQDOF (see below) * LBQTEST=[season freq.] Does Ljung-Box Q-tests for serial correlation * up to the LBQTESTth order * LBQDOF=[0] Degrees of freedom correction for above test. If * the residuals are from an estimated ARMA(p,q), use * QDOF=p+q * [LMP]/NOLMP LM tests for serial correlation * LMTEST=[season freq.] sets the LM test to the seasonal frequency of * the data * [LMLOOP]/NOLMLOOP tests up to the LMTESTth order of serial * correlation * ARTEST=[season freq.] sets the simple and restricted AR test to the * seasonal frequency of the data * [ARLOOP]/NOARLOOP tests up to the ARth order of simple serial * correlation * [WALLIS]/NOWALLIS performs the Wallis test for fourth order serial * correlation * TESTARCH=[1] sets the order of the ARCH test * [LOOPARCH]/NOLOOPARCH tests up to the TESTARCHth order of ARCH * [BPHET]/NOBPHET tests the modified Breusch-Pagan * RESET/[NORESET] To do the RESET test, users must specify * the RESET option and supply a second supplementary * card listing the dependent variable and the model's * fitted values(RESET is appropriate only for models * estimated with OLS). * * procedure resdiag residual first last type series[real] residual type integer first last option switch print 1 option integer lbqtest 0 option integer lbqdof 0 option integer lmtest 0 option switch lmloop 1 option switch lmp 1 option integer artest 0 option switch arloop 1 option switch wallis 1 option integer testarch 0 option switch looparch 1 option switch reset 0 option switch bphet 1 local integer fobs lobs nregs lm arch base k j p ar pos neg run zero lbq local vector[integer] reglist rsetlist local series[real] resid2 pfxsq pfxcub pfxqua resnum resden prsd local vector[real] residmom local rectangular[real] newspace local real chistat d4 Zrun Zsign lbqstat dis; dis * inquire(series=residual) fobs lobs if (first .and. last) {; compute fobs=first; compute lobs=last; } enter(varying,entries=nregs) reglist dis 'Analyzing residuals in series ' %label(residual) $ ' from ' %datelabel(fobs) ' to ' %datelabel(lobs) dis ' using the following series:' dis(hold) ' ' do j=1,nregs dis(hold) %label([series]reglist(j)) ' ' end do j dis;dis;dis * * Durbin-Watson Statistic * linreg(noprint) residual fobs lobs # constant * Results displayed below under Ljung-Box Q-statistic * * Ljung-Box Q-Statistic * if lbqtest == 0 compute lbq = %cal(%year(1)+1,1) - %cal(%year(1),1) else compute lbq = lbqtest correlate(partial=prsd, print=print) residual fobs lobs resid2 dis 'Durbin-Watson Statistic:' @30 #.#### %durbin dis compute lbqstat = 0.0 do k=lbqdof+1,lbq compute lbqstat = lbqstat+%nobs*(%nobs+2)*resid2(k+1)**2/(%nobs-k) dis 'Ljung-Box Q-statistic using ' ## k ' autocorrelations:' cdf chisqr lbqstat k-lbqdof end do k dis * * LM TEST AR(k) or MA(k) * * First, decide on the order of the test. * It defaults to the seasonal frequency if lmp { if lmtest == 0 compute lm = %cal(%year(1)+1,1) - %cal(%year(1),1) else compute lm = lmtest * Test over all intermediate values if desired if lmloop do k=1,lm linreg(noprint) residual fobs+k lobs # reglist residual{1 to k} dis 'LM test for ' k 'th order serial correlation' cdf chisqr %trsq k end do k else { linreg(noprint) residual fobs+lm lobs # reglist residual{1 to lm} dis 'LM test for ' lm 'th order serial correlation' cdf chisqr %trsq lm } } dis * * Simple AR(k) process tests * * default to seasonal frequencies * if artest == 0 compute ar = %cal(%year(1)+1,1) - %cal(%year(1),1) else compute ar = artest * * Test over intermediate values if desired * if arloop do k=1,ar linreg(noprint) residual fobs+k lobs # residual{k} dis 'Testing for a simple AR(' k ') order process' cdf ttest %beta(1)/sqrt(%xx(1,1)*%seesq) %nobs-1+k end do k else { linreg(noprint) residual fobs+ar lobs # residual{ar} dis 'Testing for a simple AR(' ar ') order process' cdf ttest %beta(1)/sqrt(%xx(1,1)*%seesq) %nobs-1+k } dis * * Restricted AR(1,k) test * if (ar .ne. 1) linreg(noprint) residual fobs+ar lobs # residual{1} residual{ar} exclude(noprint) # residual{1} residual{ar} dis 'Testing for a restricted AR(1 and' ar ')process' dis 'Test statistic =' %cdstat 'with significance' %signif dis * * Wallis Test * if wallis { set resnum fobs+5 lobs = (residual-residual{4})**2 acc resnum fobs+5 lobs set resden fobs lobs = residual**2 acc resden fobs lobs compute d4 = resnum(lobs)/resden(lobs) dis 'WALLIS Test for fourth-order serial correlation:' d4 } dis * * Non-Parametric Tests * compute pos = 0 compute run = 1 compute neg = 0 do p = fobs,lobs if (residual(p) > 0) compute pos = pos+1 if (residual(p) < 0) compute neg = neg+1 if p <> fobs if (residual(p)*residual(p-1) < 0) compute run = run+1 end do p compute zero= lobs-fobs+1-pos-neg compute rpos = float(pos) compute rneg = float(neg) * * Runs Test * compute zrun = (run-(2*rneg*rpos/(rneg+rpos))+0.5)/sqrt(2*rneg*rpos* $ (2*rneg*rpos-rneg-rpos)/((rneg+rpos)**2*(rneg+rpos-1))) *dis 'Number of: Positives =' pos 'Negatives =' neg *dis ' Runs= ' run ' Zeros=' zero dis 'Runs Test for Randomness' cdf normal zrun dis;dis * * ARCH(k) TEST * clear resid2 multiply residual residual fobs lobs resid2 if testarch == 0 compute arch = 1 else compute arch = testarch * Test over all intermediate values if desired if looparch do k=1,arch linreg(noprint) resid2 fobs+k lobs # constant resid2{1 to k} dis 'Engle(1981) test for ' k 'th order ARCH' cdf chisqr %nobs*%rsquared k end do k else { linreg(noprint) resid2 fobs+arch lobs # constant resid2{1 to arch} dis 'Engle(1981) test for ' arch 'th order ARCH' cdf chisqr %nobs*%rsquared arch } dis * * Breusch-Pagan (Koenker actually) * if bphet { linreg(noprint) resid2 fobs lobs # reglist dis 'Modified Breusch-Pagan test for conditional heteroscedasticity' dis ' using only the original variables:' cdf chisqr %nobs*%rsquared nregs-1 scratch(matrix=newspace) (nregs-1) fobs lobs base do k=2,nregs multiply reglist(k) reglist(k) fobs lobs base+k-1 end do k linreg(noprint) resid2 fobs lobs # reglist base+1 to base+nregs-1 dis ' using the original variables and their squares:' cdf chisqr %nobs*%rsquared 2*(nregs-1) } dis;dis * * RATS Statistics with higher option * stat residual fobs lobs * * Sign Test * compute zsign = (2*pos-(pos+neg)-1)/sqrt(pos+neg) *dis 'Number of usable observations:' lobs-fobs+1-zero dis 'Sign Test' cdf normal zsign dis * * Jarque-Bera test * dimension residmom(4) do k=2,4 set resid2 fobs lobs = residual**k acc resid2 fobs lobs compute residmom(k) = resid2(lobs)/%nobs end do k compute chistat = (%nobs/6.0)*((residmom(3)/(sqrt(residmom(2)**(3))))**2) + $ (%nobs/24.0)*((residmom(4)/(residmom(2)**2) - 3)**2) dis 'Jarque-Bera Test for normality:' cdf chisqr chistat 2 dis;dis * * RESET Test * if reset { enter(varying) rsetlist set pfxsq fobs lobs = [series]rsetlist(2)**2 set pfxcub fobs lobs = [series]rsetlist(2)**3 set pfxqua fobs lobs = [series]rsetlist(2)**4 dis 'Ramsey RESET test using the following powers of fitted values:' cmoment fobs lobs # rsetlist(1) reglist pfxsq pfxcub pfxqua linreg(cmom,noprint) rsetlist(1) fobs lobs # pfxsq reglist exclude(noprint) # pfxsq dis 'Powers = 2, test statistic = ' %cdstat ' with significance ' %signif linreg(cmom,noprint) rsetlist(1) fobs lobs # pfxsq pfxcub reglist exclude(noprint) # pfxsq pfxcub dis 'Powers=2,3, test statistic = ' %cdstat ' with significance ' %signif linreg(cmom,noprint) rsetlist(1) fobs lobs # pfxsq pfxcub pfxqua reglist exclude(noprint) # pfxsq pfxcub pfxqua dis 'Powers 2-4, test statistic = ' %cdstat ' with significance ' %signif } dis;dis * release newspace end proc env echo * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * RESDIAG.SRC * Copyright 1993 by the Bank of Canada * * Programmed for RATS by Robert Amano, Jeff Gable and Simon van Norden * * In exchange for access to these procedures, users are requested to * * acknowledge the use of the Bank of Canada RATS procedures in * * all published work. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * From ???@??? Mon Mar 13 15:10:09 2000 Received: from SpoolDir by EFS01 (Mercury 1.40); 11 Mar 100 16:20:49 GMT+1000 From: Azali Ong Mari To: "RATS Discussion List" Subject: 2 s.e. upper & lower bounds Impulse response functions for Berna Date: Sat, 11 Mar 2000 13:19:12 +0000 Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32) (via Mercury MTS (Bindery) v1.40) Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Dear All, Does anyone can help me how to write a programme to calculate 2 s.e. upper & lower bounds impulse response functions for Bernanke.src. I would be grateful for any help, thanks in advance. Regards, Azali Ong Mari Department of Economics Faculty of Economics and Management University Putra Malaysia 43400 SERDANG Selangor Malaysia Tel No (o) : + 603 - 9486101 xtn 1671 email : azali@econ.upm.edu.my From ???@??? Tue Mar 14 21:02:24 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id UAA07230 for ; Tue, 14 Mar 2000 20:55:05 +1100 Message-Id: <200003140955.UAA07230@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Tue, 14 Mar 2000 20:55:05 +1100 (EETDT) Received: from SpoolDir by EFS01 (Mercury 1.40); 14 Mar 100 20:49:53 GMT+1000 From: "VIJAYA SARATHI N." To: "RATS Discussion List" Subject: ged distribution Date: Tue, 14 Mar 2000 14:28:25 GMT+0530 Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: Organization: IIM, Ahmedabad X-mailer: Pegasus Mail v3.31 (via Mercury MTS (Bindery) v1.40) hello colleagues, How can I generate a GED distribution through RATS? Thanks in advance for your help, Regards, sarathi From ???@??? Wed Mar 15 08:01:01 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id BAA12730 for ; Wed, 15 Mar 2000 01:00:04 +1100 Message-Id: <200003141400.BAA12730@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Wed, 15 Mar 2000 01:00:04 +1100 (EETDT) Received: from SpoolDir by EFS01 (Mercury 1.40); 15 Mar 100 00:37:17 GMT+1000 From: "Christopher F. Baum" To: "RATS Discussion List" Subject: Re: ged distribution Date: Tue, 14 Mar 2000 08:37:46 -0500 Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: X-Mailer: Mulberry (MacOS) [1.4.5, s/n P020-300786-009] (via Mercury MTS (Bindery) v1.40) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Take a look at Norman Morin's GARCH.SRC on the Estima web site. It allows for GED errors, and you can see how it is done in the code (search for DIST.eq.3). Kit Baum Boston College Economics --On Tue, Mar 14, 2000 14:28 +0000 "VIJAYA SARATHI N." wrote: > hello colleagues, > > How can I generate a GED distribution through RATS? > > Thanks in advance for your help, > > Regards, > > sarathi > ----------------------------------------------------------------- Kit Baum baum@bc.edu http://fmwww.bc.edu/ec-v/baum.fac.html From ???@??? Wed Mar 15 08:02:41 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id GAA10954 for ; Wed, 15 Mar 2000 06:35:04 +1100 Message-Id: <200003141935.GAA10954@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Wed, 15 Mar 2000 06:35:04 +1100 (EETDT) Received: from SpoolDir by EFS01 (Mercury 1.40); 15 Mar 100 06:30:44 GMT+1000 From: "Estima" To: "RATS Discussion List" Subject: Re: ged distribution Date: Tue, 14 Mar 2000 12:53:02 -0600 Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: Organization: Estima MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT X-mailer: Pegasus Mail for Win32 (v3.11) (via Mercury MTS (Bindery) v1.40) > hello colleagues, > > How can I generate a GED distribution through RATS? > > Thanks in advance for your help, > > Regards, > > sarathi If by "generate" you mean creating draws from, the procedure below will do it. Tom Doan Estima proc ged x n type vect *x type integer n * * Draws for a generalized error distribution by acceptance- * rejection method. * * Written March, 2000 by Tom Doan, Estima. * * Syntax: @GED(nu=shape parameter) x n * x = vector of reals (output) * n = desired dimension of n * nu = shape parameter. Should be >=1. * option real nu 2.0 local integer i local real e r local real scalef if nu<1.0 { disp '**** NU = ' nu 'is illegal. It should be >=1 ****' return } * * For convenience, we're using a simple one-sided exponential * variate as the comparison. The kernel of the target distribution * is exp(-x**nu). This needs to be symmetrized and scaled to * a variance of 1.0 at the end. The following computes the * needed scale factor. * compute scalef=exp(.5*(%lngamma(1.0/nu)-%lngamma(3.0/nu))) dim x(n) do i=1,n loop compute e = -log(%uniform(0.0,1.0)) compute r = exp(-(e**nu))/exp(-e) if r>%uniform(0.0,1.0) break end loop compute x(i)=%if(%uniform(0.0,1.0)>.5,e,-e)*scalef end do i end -- ------------------------------------------------------------ | Estima | Sales: (800) 822-8038 | | P.O. Box 1818 | (847) 864-8772 | | Evanston, IL 60204-1818 | Support: (847) 864-1910 | | USA | Fax: (847) 864-6221 | | http://www.estima.com | estima@estima.com | ------------------------------------------------------------ From ???@??? Sun Mar 19 17:52:00 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id MAA14032 for ; Sat, 18 Mar 2000 12:55:04 +1100 Message-Id: <200003180155.MAA14032@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Sat, 18 Mar 2000 12:55:04 +1100 (EETDT) Received: from SpoolDir by EFS01 (Mercury 1.40); 18 Mar 100 12:53:58 GMT+1000 From: "Yuan Sun" To: "RATS Discussion List" Subject: kalman filter Date: Fri, 17 Mar 2000 21:04:10 -0800 Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: MIME-Version: 1.0 Content-Type: text/plain; Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook Express 5.00.2615.200 (via Mercury MTS (Bindery) v1.40) I have a measurement equation: y = a + b*x + e, and the state vector bt = p*b t-1 + Vt, where var(Vt) = Mt. I want to use the kalman filter to estimate the two equations together and get the estimate of b and Mt. How can I do it in Rats? Tiffany Sun From ???@??? Fri Mar 24 09:46:28 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id GAA08396 for ; Fri, 24 Mar 2000 06:00:04 +1100 Message-Id: <200003231900.GAA08396@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Fri, 24 Mar 2000 06:00:04 +1100 (EETDT) Received: from SpoolDir by EFS01 (Mercury 1.40); 24 Mar 100 05:39:10 GMT+1000 From: Ying-Man Chung To: "RATS Discussion List" Subject: RE: 250-days moving average of stock prices Date: Thu, 23 Mar 2000 10:39:17 -0800 (PST) Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mercury MTS (Bindery) v1.40 Dear Rats users, I want to draw a line of 250-days moving average of the stock price every day. Anybody can show my the program to calculate the moving average, please? regards, Sarah, HKSYC __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com From ???@??? Fri Mar 24 09:46:42 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id GAA11578 for ; Fri, 24 Mar 2000 06:10:05 +1100 Message-Id: <200003231910.GAA11578@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Fri, 24 Mar 2000 06:10:05 +1100 (EETDT) Received: from SpoolDir by EFS01 (Mercury 1.40); 24 Mar 100 06:08:25 GMT+1000 From: "Iacoviello,M (pg)" To: "RATS Discussion List" Subject: RE: 250-days moving average of stock prices Date: Thu, 23 Mar 2000 19:07:30 -0000 Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) (via Mercury MTS (Bindery) v1.40) Content-Type: text/plain Use the following command mvstats(span=250,means=avstockprice) stockprice Replace avstockprice with the name that you want to assign to the averaged variable, and stockprice with the original name of your variable, of course. Regards Matteo > ---------- > From: Ying-Man Chung[SMTP:y_mchung@yahoo.com] > Reply To: RATS Discussion List > Sent: 23 March 2000 18:39 > To: RATS Discussion List > Subject: RE: 250-days moving average of stock prices > > Dear Rats users, > > I want to draw a line of 250-days moving average of > the stock price every day. Anybody can show my the > program to calculate the moving average, please? > > regards, > > Sarah, > > HKSYC > > __________________________________________________ > Do You Yahoo!? > Talk to your friends online with Yahoo! Messenger. > http://im.yahoo.com > From ???@??? Mon Mar 27 07:45:54 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id FAA15674 for ; Mon, 27 Mar 2000 05:30:04 +1000 Message-Id: <200003261930.FAA15674@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Mon, 27 Mar 2000 05:30:04 +1000 (EET) Received: from SpoolDir by EFS01 (Mercury 1.40); 27 Mar 100 05:02:41 GMT+1000 From: Xi Li To: "RATS Discussion List" Subject: constraints on GARCH Date: Sun, 26 Mar 2000 13:03:02 -0600 Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) (via Mercury MTS (Bindery) v1.40) Content-Type: text/plain; Dear friends, I wonder if any one know how to put positivity constraints on estimated coefficients of GARCH process and if we need to adjust the stadard error, etc. for the estimated coefficient. And any one know how to impose restriction that the sum of the ARCH process coefficients is less than 1? Thanks a lot. Xi From ???@??? Mon Mar 27 07:47:05 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id GAA16624 for ; Mon, 27 Mar 2000 06:50:04 +1000 Message-Id: <200003262050.GAA16624@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Mon, 27 Mar 2000 06:50:04 +1000 (EET) Received: from SpoolDir by EFS01 (Mercury 1.40); 27 Mar 100 06:48:03 GMT+1000 From: Xi Li To: "RATS Discussion List" Date: Sun, 26 Mar 2000 14:48:31 -0600 Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) (via Mercury MTS (Bindery) v1.40) Content-Type: text/plain; Dear Rob, Sorry to send you the second message. I found that you have written multivariate GARCH procedure in Estima's procedure page. I wonder if your version of procedure include the positivity constraints on coefficients in variance processes? Thanks a lot and hope you have a nice day. Best regards, Xi From ???@??? Mon Mar 27 07:47:03 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id GAA16620 for ; Mon, 27 Mar 2000 06:50:04 +1000 Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Mon, 27 Mar 2000 06:50:04 +1000 (EET) Received: from SpoolDir by EFS01 (Mercury 1.40); 27 Mar 100 06:48:02 GMT+1000 Received: from baldrick.ocs.mq.edu.au (137.111.1.12) by efs01.efs.mq.edu.au (Mercury 1.40) with ESMTP; 27 Mar 100 06:48:00 GMT+1000 Received: from mailserver.vanderbilt.edu (owen.Vanderbilt.Edu [129.59.210.168]) by baldrick.ocs.mq.edu.au (8.9.2/8.9.2) with ESMTP id GAA09089; Mon, 27 Mar 2000 06:48:32 +1000 (EST) Received: by owen.Vanderbilt.Edu with Internet Mail Service (5.5.2650.21) id ; Sun, 26 Mar 2000 14:48:32 -0600 Message-ID: <8A33E15E48FFD311BD6C0008C756CD1B59B9D6@owen.Vanderbilt.Edu> From: Xi Li To: "'RATS-L@EFS.MQ.EDU.AU'" Cc: "'RATS-L-OWNER@EFS.MQ.EDU.AU'" Date: Sun, 26 Mar 2000 14:48:31 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Dear Rob, Sorry to send you the second message. I found that you have written multivariate GARCH procedure in Estima's procedure page. I wonder if your version of procedure include the positivity constraints on coefficients in variance processes? Thanks a lot and hope you have a nice day. Best regards, Xi From ???@??? Tue Mar 28 10:09:48 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id HAA08434 for ; Tue, 28 Mar 2000 07:45:05 +1000 Message-Id: <200003272145.HAA08434@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Tue, 28 Mar 2000 07:45:05 +1000 (EET) Received: from SpoolDir by EFS01 (Mercury 1.40); 28 Mar 100 07:43:42 GMT+1000 From: SsnaithIPR@aol.com To: "RATS Discussion List" Subject: ERRORS command Date: Mon, 27 Mar 2000 16:43:36 EST Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: AOL 4.0 for Windows 95 sub 61 (via Mercury MTS (Bindery) v1.40) s there any way to get to a specific value saved with the save option in the Errors command. I want to access values for a specific equation, step and variable from a decomposition of forecast variance Or perhaps more generally, how does one access a single element when you have a vector of arrays. Regards, Sean From ???@??? Wed Mar 29 09:28:55 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id JAA18340 for ; Wed, 29 Mar 2000 09:25:04 +1000 Message-Id: <200003282325.JAA18340@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Wed, 29 Mar 2000 09:25:04 +1000 (EET) Received: from SpoolDir by EFS01 (Mercury 1.40); 29 Mar 100 09:21:33 GMT+1000 From: "Estima" To: "RATS Discussion List" Subject: Re: ERRORS command Date: Tue, 28 Mar 2000 10:38:11 -0600 Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: Organization: Estima MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT X-mailer: Pegasus Mail for Win32 (v3.11) (via Mercury MTS (Bindery) v1.40) > s there any way to get to a specific value saved with the save option in the > Errors command. I want to access values for a specific equation, step and > variable from a decomposition of forecast variance > > Or perhaps more generally, how does one access a single element when you have > a vector of arrays. > As (sort of) mentioned on page 14-75, you can get the fraction of the variance for: equation i, at step k, that is explained by variable j, from: decomp(i)(k,j) For example, for equation 1, step 2, explained by variable 3: compute d = decomp(1)(2,3) Note that there should be no spaces anywhere in "decomp(i)(k,j)". What you have is a VECTOR of RECTANGULAR arrays, so the first set of parens contains a one-dimensional index number--indicating which element of the VECTOR you are referring to. The second set of parens indicates which element of that RECTANGULAR array you are referring to. If you instead had a RECTANGUALR array of VECTORS, for example, a reference to a single number would take the form: RV(x,y)(z) Sincerely, Tom Maycock Estima -- ------------------------------------------------------------ | Estima | Sales: (800) 822-8038 | | P.O. Box 1818 | (847) 864-8772 | | Evanston, IL 60204-1818 | Support: (847) 864-1910 | | USA | Fax: (847) 864-6221 | | http://www.estima.com | estima@estima.com | ------------------------------------------------------------ From ???@??? Wed Mar 29 22:12:30 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id WAA11024 for ; Wed, 29 Mar 2000 22:10:03 +1000 Message-Id: <200003291210.WAA11024@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Wed, 29 Mar 2000 22:10:04 +1000 (EET) Received: from SpoolDir by EFS01 (Mercury 1.40); 29 Mar 100 22:05:51 GMT+1000 From: "Stephan Kohns" To: "RATS Discussion List" Subject: Use of INPUT in a procedure Date: Wed, 29 Mar 2000 14:05:41 +0100 Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: MIME-Version: 1.0 Content-Type: multipart/alternative; X-Mailer: Microsoft Outlook Express 5.00.2919.6600 (via Mercury MTS (Bindery) v1.40) ------=_NextPart_000_0045_01BF9987.DE347E00 Content-Type: text/plain; charset="iso-8859-1" Dear RATS users, I want to initialize a rectangular matrix within a procedure using the INPUT-command. Consider the following sample program and procedure (what I actually want to do is to write a procedure that computes certain critical values, and the matrix would contain parameters needed for the calculation): Main program: dec real r dec int i j source(echo) d:\winrats\inputtst.src com r = 0.0 com i = 2, j = 3 @inputtest i j r dis r Procedure: procedure inputtest i j wert type integer i j type real *wert local rect[real] testm dim testm(1,3) dis 'before input' input testm 1.1 1.2 1.3 2.1 2.2 2.3 3.1 3.2 3.3 4.1 4.2 4.3 dis 'after input' com wert = testm(i,j) end When running the program, I get the following output: procedure inputtest i j wert (01.0016) type integer i j (01.0016) type real *wert (01.0016) local rect[real] testm (01.0030) dim testm(1,3) (01.0049) dis 'before input' (01.0064) input testm (01.0077) 1.1 1.2 1.3 (01.0104) 2.1 2.2 2.3 (01.0131) 3.1 3.2 3.3 (01.0158) 4.1 4.2 4.3 (01.0185) dis 'after input' (01.0199) com wert = testm(i,j) (01.0225) end before input ## IO40. Expected real number. Got "dis". The Error Occurred At Location 0076 of Does anybody have an idea what is going wrong here? The input-section works smoothly in the main program, but somehow the procedure seems to get stuck after the input command (note that the second 'dis' is not executed). The error message appears when executing the display-command 'dis r' in the main program, i.e. after the procedure has been finished. Thanks a lot for your help Stephan Kohns ------extPart_000_0045_01BF9987.DE347E00 Content-Type: text/html; charsetso-8859-1" Content-Transfer-Encoding: quoted-printable
Dear RATS users,
 I want to initialize a rectangular matrix within a procedure using the INPUT-command. Consider the following sample program and procedure (what I actually want to do is to write a procedure that computes certain critical values, and the matrix would contain parameters needed for the calculation):
 
Main program:
dec real r
dec int i j
source(echo) d:\winrats\inputtst.src
com r = 0.0
com i = 2, j = 3
@inputtest i j r
dis r
 
Procedure:
procedure inputtest i j wert
type integer i j
type real *wert
local rect[real] testm
dim testm(1,3)
dis 'before input'
input testm
 1.1 1.2 1.3
 2.1 2.2 2.3
 3.1 3.2 3.3
 4.1 4.2 4.3
dis 'after input'
com wert = testm(i,j)
end
 
When running the program, I get the following output:
procedure inputtest i j wert
(01.0016) type integer i j
(01.0016) type real *wert
(01.0016) local rect[real] testm
(01.0030) dim testm(1,3)
(01.0049) dis 'before input'
(01.0064) input testm
(01.0077)  1.1 1.2 1.3
(01.0104)  2.1 2.2 2.3
(01.0131)  3.1 3.2 3.3
(01.0158)  4.1 4.2 4.3
(01.0185) dis 'after input'
(01.0199) com wert = testm(i,j)
(01.0225) end
 
before input
## IO40. Expected real number. Got "dis".
The Error Occurred At Location 0076 of
 
 Does anybody have an idea what is going wrong here? The input-section works smoothly in the main program, but somehow the procedure seems to get stuck after the input command (note that the second 'dis' is not executed). The error message appears when executing the display-command 'dis r' in the main program, i.e. after the procedure has been finished.
 
 Thanks a lot for your help
 Stephan Kohns
------extPart_000_0045_01BF9987.DE347E00--
From ???@??? Thu Mar 30 08:40:43 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id IAA07282 for ; Thu, 30 Mar 2000 08:40:04 +1000 Message-Id: <200003292240.IAA07282@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Thu, 30 Mar 2000 08:40:04 +1000 (EET) Received: from SpoolDir by EFS01 (Mercury 1.40); 30 Mar 100 08:35:48 GMT+1000 From: "Estima" To: "RATS Discussion List" Subject: Re: Use of INPUT in a procedure Date: Wed, 29 Mar 2000 16:18:28 -0600 Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: Organization: Estima MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT X-mailer: Pegasus Mail for Win32 (v3.11) (via Mercury MTS (Bindery) v1.40) > > Main program: > dec real r > dec int i j > source(echo) d:\winrats\inputtst.src > com r =3D 0.0 > com i =3D 2, j =3D 3 > @inputtest i j r > dis r > > Procedure: > procedure inputtest i j wert > type integer i j > type real *wert > local rect[real] testm > dim testm(1,3) > dis 'before input' > input testm > 1.1 1.2 1.3 > 2.1 2.2 2.3 > 3.1 3.2 3.3 > 4.1 4.2 4.3 > dis 'after input' > com wert =3D testm(i,j) > end > The INPUT and READ commands don't work the way we would really like them to in a compiled section. Instead of handling the above situations properly, they will look for the input data after the procedure call. So, the solution would be to do one of the following: 1) Move the data to the main program following the procedure call. For example, you would delete the data block from the procedure and (assuming you change the dimensions of TESTM to (4,3), do the following in your main program: @inputtest i j r 1.1 1.2 1.3 2.1 2.2 2.3 3.1 3.2 3.3 4.1 4.2 4.3 2) Input the data in your procedure file, but do it before the PROCEDURE command. This means you'll be putting it into a global variable. For example: declare rect testm dim testm(4,3) input testm 1.1 1.2 1.3 2.1 2.2 2.3 3.1 3.2 3.3 4.1 4.2 4.3 procedure inputtest i j wert type integer i j type real *wert com wert =testm(i,j) end 3) Use a COMPUTE command to set up the matrix variable. procedure inputtest i j wert type integer i j type real *wert local rect[real] testm compute testm = || 1.1, 1.2, 1.3 | $ 2.1, 2.2, 2.3 | $ 3.1, 3.2, 3.3 | $ 4.1, 4.2, 4.3 || etc. Sincerely, Tom Maycock Estima -- ------------------------------------------------------------ | Estima | Sales: (800) 822-8038 | | P.O. Box 1818 | (847) 864-8772 | | Evanston, IL 60204-1818 | Support: (847) 864-1910 | | USA | Fax: (847) 864-6221 | | http://www.estima.com | estima@estima.com | ------------------------------------------------------------ From ???@??? Thu Mar 30 11:15:36 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id LAA13828 for ; Thu, 30 Mar 2000 11:15:05 +1000 Message-Id: <200003300115.LAA13828@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Thu, 30 Mar 2000 11:15:05 +1000 (EET) Received: from SpoolDir by EFS01 (Mercury 1.40); 30 Mar 100 11:13:15 GMT+1000 From: Rob Trevor To: "RATS Discussion List" Subject: Re: Date: Thu, 30 Mar 2000 11:13:27 +1000 Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Mailer: Mercury MTS (Bindery) v1.40 There was a discussion you will find in the archives re different ways of forcing a parameter to be non-negative. From memory: abs(a) or sqrt(a)*sqrt(a) or sqrt(a*a) will work and give correct asymptotic se's - some a bit better than others. (I've never had trouble with sqrt(a)*sqrt(a).) From memory the more recent garch procedure on the Estima web site incorporates non-negativity constraints. (The one written by Normin Morin.) If it doesn't, it should be easy to add. (If you want to ensure that the parameters sum to less than 1, just define one of the parameters as the residual and force that to be non-negative.) Cheers Rob At 2:48 PM -0600 26/3/00, Xi Li wrote: >Dear Rob, > >Sorry to send you the second message. I found that you have written >multivariate GARCH procedure in Estima's procedure page. I wonder if your >version of procedure include the positivity constraints on coefficients in >variance processes? > >Thanks a lot and hope you have a nice day. > >Best regards, > >Xi From ???@??? Fri Mar 31 09:25:43 2000 Received: from localhost (localhost [127.0.0.1]) by amethyst.efs.mq.edu.au (8.9.1/8.9.1) with ESMTP id HAA08150 for ; Fri, 31 Mar 2000 07:55:04 +1000 Message-Id: <200003302155.HAA08150@amethyst.efs.mq.edu.au> Received: from efs01.efs.mq.edu.au by localhost with POP3 (fetchmail-5.0.0) for robt@localhost (single-drop); Fri, 31 Mar 2000 07:55:05 +1000 (EET) Received: from SpoolDir by EFS01 (Mercury 1.40); 31 Mar 100 07:51:25 GMT+1000 From: Vivek Ghosal To: "RATS Discussion List" Subject: Panel data Date: Thu, 30 Mar 2000 10:04:00 -0500 Errors-to: Reply-to: "RATS Discussion List" Sender: Maiser@efs01.efs.mq.edu.au X-listname: X-Mailer: Worldtalk (NetJunction 4.6-p7)/MIME (via Mercury MTS (Bindery) v1.40) Hello - I have a panel with N (=350) cross-section units and T (=40) time series. The data are already sorted by N and then T. I will run a regression for each of the N units; i.e., first for N=1, then N=2,.... Question: Is there a way to output all the estimates (and standard errors) in a convenient format. That is, I do not want to look through each of the 350 regressions, but want the parameter est's and s.e.'s in some format like...(my regression has multiple beta's): N beta s.e. (if possible, here or separately) 1 beta(1,1) s.e.(1,1) 2 beta(2,1) 3 .. .. 350 beta(350,1) s.e.(350,1) (Also, if possible, output the regression R-square or any summary statistic.) My ultimate objective is to use these beta's in a second-stage cross-section regression. I can do some of this in SAS fairly easily, but not sure how to do it in RATS. Many thanks in advance. Vivek