projcov: Calculate the Projected covariance of two vectors

Description Usage Arguments Value Examples

Description

projcov calculate the projected distance covariance of two vectors given factors.

Usage

1
projcov(x, y, b, method = c("ridge", "lasso", "sam"))

Arguments

x

first vector

y

second vector

b

factor matrix

method

projection method. Default = 'linear'.

Value

a list.

test

distance covariance test object

xeps

residual of the projection of x

yeps

residual of the projection of y

Examples

1
2
3
4
5
6
7
8
9
K = 3
n = 100
b = matrix(rnorm(K*n),n,K)
bx = 1:3
by = c(1,2,2)
x = b%*%bx+rnorm(n)
y = b%*%by+rnorm(n)
fit1 = projcov(x, y, b)
fit2 = projcov(x, y, b, method = "sam")

statcodes/pgraph documentation built on May 30, 2019, 9:42 a.m.