Command Reference : Function Reference : Function Reference: C
  
 
@ctrendcoef
Slope from a trend regression on each column of a matrix.
Syntax: @ctrendcoef(m)
m: matrix
Return: vector
Returns a vector of slopes from a trend regression, each the result of applying @trendcoef to the columns of m.
Examples
vector trend = @grid(0, 10000, 10001)
matrix m1 = @hcat(1+0.5*trend, 1+2*trend) + @mnrnd(10001, 2)
= @ctrendcoef(m1)
produces a vector of two elements, the first of which should be close to 0.5, the second of which should be approximately 2.
Cross-references
See also @cintercept, @intercept, and @trendcoef.