#' Use pspectrum function to compute long run variance
#'
#' @param x data
#' @param ... other parameters
#' @param verbose verbose or not
#' @param plot plot or not
#'
#' @return long run variance of x
#' @export
#'
#' @examples
SE.pspectrum = function(x, ..., verbose = FALSE, plot = FALSE){
n = length(x)
res.pspectrum = pspectrum(x, verbose = verbose, plot = plot)
return(res.pspectrum$spec[1]/n/2)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.