Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
braverock
GitHub Repository: braverock/portfolioanalytics
Path: blob/master/man/center.Rd
1433 views
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stat.factor.model.R
\name{center}
\alias{center}
\title{Center}
\usage{
center(x)
}
\arguments{
\item{x}{matrix}
}
\value{
matrix of centered data
}
\description{
Center a matrix
}
\details{
This function is used primarily to center a time series of asset returns or 
factors. Each column should represent the returns of an asset or factor 
realizations. The expected value is taken as the sample mean.

x.centered = x - mean(x)
}