Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

projection.ip

Projection of columns of a matrix.


Description

Projects the columns of the matrix M on the space spanned by the columns of the matrix X, with respect to the inner product defined by weight: <x|y>=sum(x*w*y).

Usage

projection.ip(X, M, orth = FALSE, weight = rep(1, nrow(X)))

Arguments

X

Matrix defining the space to project onto.

M

Matrix of columns to be projected. Must have the same number of rows as X.

orth

Should the projection be on the orthogonal complement to span(X)?

weight

Weights defining the inner product. Numerical vector of length nrow(X).

Value

A matrix of full rank with columns in span(X)

Author(s)

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

See Also


Epi

Statistical Analysis in Epidemiology

v2.44
GPL-2
Authors
Bendix Carstensen [aut, cre], Martyn Plummer [aut], Esa Laara [ctb], Michael Hills [ctb]
Initial release
2021-02-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.