detrend: Projection of a model matrix on to the orthogonal complement...

Description Usage Arguments Details Value Author(s) See Also

View source: R/detrend.R

Description

The columns of the model matrix M is projected on the orthogonal complement to the matrix (1,t). Orthogonality is defined w.r.t. an inner product defined by the weights weight.

Usage

1
  detrend( M, t, weight = rep(1, nrow(M)) )

Arguments

M

A model matrix.

t

The trend defining a subspace. A numerical vector of length nrow(M)

weight

Weights defining the inner product of vectors x and y as sum(x*w*y). A numerical vector of length nrow(M), defaults to a vector of 1s.

Details

The functions is intended to be used in parametrization of age-period-cohort models.

Value

A full-rank matrix with columns orthogonal to (1,t).

Author(s)

Bendix Carstensen, Steno Diabetes Center, http://BendixCarstensen.com, with help from Peter Dalgaard.

See Also

projection.ip


Epi documentation built on Aug. 10, 2017, 3:01 p.m.

Related to detrend in Epi...