Hi:

The input to jarque.bera.test() is a numeric vector or time series. Try
running the function str() on your input object to see if it is of the
correct type. If you have a vector that is not numeric or a time series
object, you need to convert it to one with something like as.numeric(myvec).
The function won't work directly on a data frame or matrix, for example. If
it still doesn't work after you've tried to make changes, please provide a
reproducible, small example that illustrates the problem.

Here's an illustration of what I mean:

x <- rnorm(100)
xx <- ts(x)
> class(x)
[1] "numeric"
> class(xx)
[1] "ts"

> library(tseries)
> jarque.bera.test(x)

        Jarque Bera Test

data:  x
X-squared = 7.7779, df = 2, p-value = 0.02047

> jarque.bera.test(xx)

        Jarque Bera Test

data:  xx
X-squared = 7.7779, df = 2, p-value = 0.02047

xxx <- matrix(x, ncol = 2)
> jarque.bera.test(xxx)
Error in jarque.bera.test(xxx) :
  x is not a vector or univariate time series

HTH,
Dennis

On Tue, Nov 16, 2010 at 6:56 PM, Kiana Basiri <kiana.basiri@gmail.com>wrote:

> Hello,
> I'm so confused why I can't run Jarque-Bera test on my data. I have 9968
> observation and I want to run Jarque-Bera test on them, but no matter how
> hard I am trying I can't get it work. please let me know what should I do.
>
> Best,
> Kiana
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>

	[[alternative HTML version deleted]]

