[R] Extracting slots from an object (e.g.: object produced by unit root test function urdfTest)

2015-03-12 Thread jpm miao
Hi, I run a statistical test function in the package fUnitRoots that returns a S4 object but I am wondering how to extract the p-value, one of the output elements. The document of the function urdfTest: . All tests return an object of class fHTEST with the following slots: @call .

Re: [R] Extracting slots from an object (e.g.: object produced by unit root test function urdfTest)

2015-03-12 Thread jpm miao
Thank you very much. Could we extract the p-value in the output of the ur.df function? Does there exist any unit root test function where the p-value can be extracted? Thanks! An example for ur.df function: data(Raotbl3) attach(Raotbl3) lc.df - ur.df(y=lc, lags=3, type='trend') summary(lc.df)

Re: [R] Extracting slots from an object (e.g.: object produced by unit root test function urdfTest)

2015-03-12 Thread David Winsemius
On Mar 12, 2015, at 7:49 PM, jpm miao wrote: Thank you very much. Could we extract the p-value in the output of the ur.df function? Does there exist any unit root test function where the p-value can be extracted? Thanks! If this were an S3 function, it would be a fairly simple operation

Re: [R] Extracting slots from an object (e.g.: object produced by unit root test function urdfTest)

2015-03-12 Thread jpm miao
Sorry. Let me modify the question: Does there exist any unit root test function (with trend or intercept) where the p-value can be extracted? The function adf.test in tseries package does return the p-value, but there's no choice of trend or intercept. Thanks. 2015-03-13 10:49 GMT+08:00 jpm miao

Re: [R] Extracting slots from an object (e.g.: object produced by unit root test function urdfTest)

2015-03-12 Thread David Winsemius
On Mar 12, 2015, at 1:04 AM, jpm miao wrote: Hi, I run a statistical test function in the package fUnitRoots that returns a S4 object but I am wondering how to extract the p-value, one of the output elements. The document of the function urdfTest: . All tests return an object of