Re: [R] Obtaining values from adfstat objects

2008-02-26 Thread Matt33

Thanks for the tip, Erik. I did check, but didn't see any $... elements to
choose from. For comparison, I checked another object class (lm) with the
str function, and it clearly showed $coefficients, $residuals, etc..

So it would seem that the usual approach doesn't work with adfstat
objects...
-- 
View this message in context: 
http://www.nabble.com/Obtaining-values-from-adfstat-objects-tp15699940p15700174.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Obtaining values from adfstat objects

2008-02-26 Thread Erik Iverson
Try str(yourobject) to see the structure of the object.  If there were a 
value called, say, p.value, you could then do:

myvar <- yourobject$p.value

This is just general advice, I don't know the specifics of the package 
you mention, but try this first.

Best,
Erik Iverson

Matt33 wrote:
> Hi,
> 
> I'm using the ADF.test function in the uroot package to obtain an
> adfstat-class object. I'm wondering how I can extract the values (test
> statistic, p value, etc.) from this class, since it doesn't seem to have
> usual values. I get the following summary, but I'm not sure how to do
> anything with these values -- how can I put the number into another
> variable?
> 
>   - -- - -- 
>   Augmented Dickey & Fuller test
>   - -- - -- 
> 
>   Null hypothesis: Unit root.
>   Alternative hypothesis: Stationarity.
> 
> 
>   ADF statistic:
> 
> Estimate Std. Error t value Pr(>|t|)
> adf.reg   -0.997  0.123  -8.074 0.01
> 
>   Lag orders: 
>   Number of available observations: 67 
> Warning message:
> In interpolpval(code = code, stat = adfreg[, 3], N = N) :
>   p-value is smaller than printed p-value
> 
> Thanks.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Obtaining values from adfstat objects

2008-02-26 Thread Matt33

Hi,

I'm using the ADF.test function in the uroot package to obtain an
adfstat-class object. I'm wondering how I can extract the values (test
statistic, p value, etc.) from this class, since it doesn't seem to have
usual values. I get the following summary, but I'm not sure how to do
anything with these values -- how can I put the number into another
variable?

  - -- - -- 
  Augmented Dickey & Fuller test
  - -- - -- 

  Null hypothesis: Unit root.
  Alternative hypothesis: Stationarity.


  ADF statistic:

Estimate Std. Error t value Pr(>|t|)
adf.reg   -0.997  0.123  -8.074 0.01

  Lag orders: 
  Number of available observations: 67 
Warning message:
In interpolpval(code = code, stat = adfreg[, 3], N = N) :
  p-value is smaller than printed p-value

Thanks.
-- 
View this message in context: 
http://www.nabble.com/Obtaining-values-from-adfstat-objects-tp15699940p15699940.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.