[R-SIG-Finance] Finding price difference of a time series

Daniel Cegiełka daniel.cegielka at gmail.com
Sun Aug 4 16:17:37 CEST 2013


2013/8/3 veepsirtt <veepsirtt at gmail.com>:
> Hello Paul Teetor,
>
> p-value  is correct,still getting error.
>
>> ht
>         Augmented Dickey-Fuller Test
>
> data:  spreadT
> Dickey-Fuller = -2.2872, Lag order = 0, p-value = 0.4572
> alternative hypothesis: stationary
>> ht$p-valueError in ht$p - value : non-numeric argument to binary operator


Hi Veepsirtt,

I think Paul is right. Take this example:

> a<-list()
> a$p_value = 123
> a$p_value
[1] 123
>
> a$p-value = 456
Error in a$p - value = 456 : could not find function "-<-"
> a
$p_value
[1] 123

So with "p-value" variable you have a lot of potential to generate errors.

Best regards,
Daniel



More information about the R-SIG-Finance mailing list