Command Reference : Matrix Language Reference
  
 
@detrend
Syntax: @detrend(A)
Argument: vector or matrix, A
Return: vector or matrix
Returns the residuals of an OLS regression on vector or matrix A versus an implicit time trend. When applied to a matrix, the matrix elements are paired with the implicit time trend in vectorization order.
See also @trendcoef, @intercept, and @coldetrend