Grocer Function

NAME

detrend - detrend a matrix

CALLING SEQUENCE

[resid]=detrend(y,p)

PARAMETERS

Input

Output

DESCRIPTION

Detrends a matrix y using regression of y against a polynomial time trend of order p

EXAMPLE

1) xdt=detrend(x,0) 2) xdt=detrend(x,1) 3) r0t = detrend(trimr(dx,grocer_k,0),f) (see johansen.sci)

Example 1 simply demeans x, example 2 detrends it by a linear trend, example 3 taken from the function johansen detrends variable trimr(dx,grocer_k,0) by a trend of order f.

AUTHOR

Eric Dubois 2002