1\name{numEff} 2\alias{numEff} 3\concept{numerical efficiency} 4 5\title{Compute Numerical Standard Error and Relative Numerical Efficiency} 6 7\description{ 8\code{numEff} computes the numerical standard error for the mean of a vector of draws as well as the relative numerical efficiency (ratio of variance of mean of this time series process relative to iid sequence). 9} 10 11\usage{numEff(x, m = as.integer(min(length(x),(100/sqrt(5000))*sqrt(length(x)))))} 12 13\arguments{ 14 \item{x}{ \eqn{R x 1} vector of draws } 15 \item{m}{ number of lags for autocorrelations } 16} 17 18\details{ 19default for number of lags is chosen so that if \eqn{R=5000}, \eqn{m=100} and increases as the \eqn{sqrt(R)}. 20} 21 22\value{ 23 A list containing: 24 \item{stderr }{standard error of the mean of \eqn{x}} 25 \item{f }{ variance ratio (relative numerical efficiency) } 26} 27 28\section{Warning}{ 29This routine is a utility routine that does \strong{not} check the input arguments for proper dimensions and type. 30} 31 32\author{Peter Rossi, Anderson School, UCLA, \email{perossichi@gmail.com}.} 33 34\references{For further discussion, see Chapter 3, \emph{Bayesian Statistics and Marketing} by Rossi, Allenby, and McCulloch. \cr \url{http://www.perossi.org/home/bsm-1}} 35 36\examples{ 37numEff(rnorm(1000), m=20) 38numEff(rnorm(1000)) 39} 40 41\keyword{ts} 42\keyword{utilities} 43