gsir: gsir

Description Usage Arguments Value References Examples

View source: R/gsir.R

Description

gsir

Usage

1
gsir(x,x.new,y,ytype,ex,ey,complex.x,complex.y,r)

Arguments

x

input predictor matrix from training set

x.new

input predictor matrix from testing set

y

response variables

ytype

type of response variables

ex

tuning parameter for the Tychonoff regularized inverse for GX

ey

tuning parameter for the Tychonoff regularized inverse for GY

complex.x

tuning parameter for the Gaussian kernel in X

complex.y

tuning parameter for the Gaussian kernel in Y

r

number of dimension

Value

suff.pred: sufficient predictors from GSIR

obj.mat: objective matrix of GSIR

eig.val: the first r eigenvalues from the eigendecomposition of the objective matrix

eig.vec: the first r eigenvectors from the eigendecomposition of the objective matrix

References

Li, B. (2018). Sufficient dimension reduction: Methods and applications with R. CRC Press.

Examples

1
2
3
4
n = 50; p = 5; sigma = 1;
x = matrix(rnorm(n*p),n,p) ; err = rnorm(n)
y = sin(0.5+(x[,1]+1)^2) + sigma*err; ex=0.01 ; ey=0.01
gsir_res <- gsir(x,x,y,"scalar",ex,ey,1,1,1)

nsdr documentation built on June 3, 2021, 9:06 a.m.

Related to gsir in nsdr...