BLA: Best linear approximation with respect to the mean square...

View source: R/BLA.R

BLAR Documentation

Best linear approximation with respect to the mean square error (theoretical linear regression).

Description

For a random vector \boldsymbol{X} = (X_1,\dots,X_p)' for which a mean and a covariance matrix are given computes coefficients of the best linear approximations with respect to the mean square error of each component of \boldsymbol{X} given the remaining components of \boldsymbol{X}.

Usage

BLA(mean=c(0, 0),  Sigma=diag(2))

Arguments

mean

a numeric vector of means.

Sigma

a covariance matrix.

Value

A list with the following components:

beta

computed regression coefficients

sigmaR2

residual variances

Author(s)

Arnošt Komárek arnost.komarek@mff.cuni.cz

References

Anděl, J. (2007, odd. 2.5). Základy matematické statistiky. Praha: MATFYZPRESS.

Examples

##### X = (U(1), U(2), U(3))'
##### * U(1) <= U(2) <= U(3)
##### * ordered uniform Unif(0, 1) variates
EX <- (1:3)/4
varX <- matrix(c(3,2,1, 2,4,2, 1,2,3), ncol=3)/80
BLA(EX, Sigma=varX)


##### Uroda sena
##### * Y1 = uroda sena [cent/akr]
##### * Y2 = jarni srazky [palce]
##### * Y3 = kumulovana teplota nad 42 F
EY <- c(28.02, 4.91, 28.7)
varY <- matrix(c(19.54, 3.89, -3.76,  3.89, 1.21, -1.31,  -3.76, -1.31, 4.52), ncol=3)
BLA(EY, Sigma=varY)


##### Z=(X, Y) ~ uniform distribution on a triangle
##### M = {(x,y): x>=0, y>=0, x+y<=3}
EZ <- c(1, 1)
varZ <- matrix(c(2, -1,  -1, 2), nrow=2)/4
BLA(EZ, Sigma=varZ)


##### W=(X, Y) ~ uniform distribution on
##### M = {(x,y): x>=0, 0<=y<=1, y<=x<=y+1}
EW <- c(1, 1/2)
varW <- matrix(c(2, 1,  1, 1), nrow=2)/12
BLA(EW, Sigma=varW)

mixAK documentation built on Sept. 25, 2023, 5:08 p.m.

Related to BLA in mixAK...