From cottrell@wfu.edu Fri Dec 17 12:16:50 2010 From: Allin Cottrell To: gretl-users@gretlml.univpm.it Subject: Re: [Gretl-users] problems getting the pvalues of johansen test Date: Fri, 17 Dec 2010 12:16:50 -0500 Message-ID: In-Reply-To: =?utf-8?q?17487=5F1292602588=5FoBHGGSIl017652=5FAANLkTimkkF5ZfR?= =?utf-8?q?xvPuNisXJZVgqS+dwdJ0V1bgwDoyip=40mail=2Egmail=2Ecom?= MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4481447422648906126==" --===============4481447422648906126== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Fri, 17 Dec 2010, artur tarassow wrote: > I am using the current cvs on Win XP. I wrote the following script to > obtain the johansen trace pvalue and test statistics recursively: > > ----------------------------------- > open denmark.gdt > smpl full > > list Y = LRM IBO IDE > scalar p = 3 #recursive test for same lag length over all the period > > matrix pv_trace = {} > matrix test_trace = {} > > smpl 1980:1 1987:3 > scalar T = $nobs > smpl 1974:1 1979:1 > loop for (i=1; i<=T; i+=1) > coint2 p Y > matrix pval = $pvalue > pval = pval[,1]' #take the first column (Trace) and put it into row i > pv_trace = pv_trace | pval > matrix t = $test > t = t[,1]' > test_trace = test_trace | t > smpl ; +1 > endloop > > > pv <- gnuplot 1 2 3 --with-lines --time-series \ > --matrix=pv_trace --output=display --single-yaxis { set title > 'Recursive p-value Trace-test'; } > > test <- gnuplot 1 2 3 --with-lines --time-series \ > --matrix=test_trace --output=display --single-yaxis { set title > 'Recursive t-value Trace-test'; } > -------------------------------- > > Unfortunately I obtain the following error message "Warning: generated > non-finite values" for some reason. Your script runs OK here. However, I'd suggest that your handling of the sample period is a bit confusing, and the main body of your script might be better re-written thus: Allin Cottrell --===============4481447422648906126==-- From artur.tarassow@googlemail.com Sun Dec 19 15:49:38 2010 From: Artur Tarassow To: gretl-users@gretlml.univpm.it Subject: Re: [Gretl-users] problems getting the pvalues of johansen test Date: Sun, 19 Dec 2010 21:49:12 +0100 Message-ID: <4D0E6FC8.1020900@googlemail.com> In-Reply-To: Pine.A41.4.58.1012171156590.414116@f1n11.sp2net.wfu.edu MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8519750787746924835==" --===============8519750787746924835== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Am 17.12.2010 18:16, schrieb Allin Cottrell: > On Fri, 17 Dec 2010, artur tarassow wrote: > >> I am using the current cvs on Win XP. I wrote the following script to >> obtain the johansen trace pvalue and test statistics recursively: >> >> ----------------------------------- >> open denmark.gdt >> smpl full >> >> list Y = LRM IBO IDE >> scalar p = 3 #recursive test for same lag length over all the period >> >> matrix pv_trace = {} >> matrix test_trace = {} >> >> smpl 1980:1 1987:3 >> scalar T = $nobs >> smpl 1974:1 1979:1 >> loop for (i=1; i<=T; i+=1) >> coint2 p Y >> matrix pval = $pvalue >> pval = pval[,1]' #take the first column (Trace) and put it into row i >> pv_trace = pv_trace | pval >> matrix t = $test >> t = t[,1]' >> test_trace = test_trace | t >> smpl ; +1 >> endloop >> >> >> pv<- gnuplot 1 2 3 --with-lines --time-series \ >> --matrix=pv_trace --output=display --single-yaxis { set title >> 'Recursive p-value Trace-test'; } >> >> test<- gnuplot 1 2 3 --with-lines --time-series \ >> --matrix=test_trace --output=display --single-yaxis { set title >> 'Recursive t-value Trace-test'; } >> -------------------------------- >> >> Unfortunately I obtain the following error message "Warning: generated >> non-finite values" for some reason. > Your script runs OK here. However, I'd suggest that your handling > of the sample period is a bit confusing, and the main body of your > script might be better re-written thus: > > > > Allin Cottrell > _______________________________________________ > Gretl-users mailing list > Gretl-users(a)lists.wfu.edu > http://lists.wfu.edu/mailman/listinfo/gretl-users HI Allin, Thank you for your script. This is weird, the script runs fine here on my ubuntu machine but not on the WinXP machine... Your further suggestions regarding the script are good - thank you. Cheers, Artur --===============8519750787746924835==--