Nothing
AutocorTest <- function(x,
lag=ceiling(log(length(x))),
type=c("Ljung-Box", "Box-Pierce", "rank"),
df=lag ){
type <- match.arg(type)
if(type=="rank"){
x <- rank(x)
type <- "Ljung-Box"
}
#
LjB <- stats::Box.test(x, lag, type)
#
if(df<=0) df <- 1
if(df != lag){
LjB$parameter <- c(df=df)
# Correct the p.value
LjB$p.value <- stats::pchisq(
LjB$statistic, df, lower.tail=FALSE)
LjB$method <- paste(LjB$method, " (lag = ", lag, ")", sep="")
}
LjB$data.name <- deparse(substitute(x))
LjB$Total.observ <- length(x)
#
LjB
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.