Learn R Programming

nsdr (version 0.1.1)

gcv: gcv

Description

gcv

Usage

gcv(x,y,eps,which,ytype,complex.x,complex.y)

Arguments

x

input predictor matrix from training set

y

response variables

eps

candidate

which

choose between ex and ey

ytype

type of response variables

complex.x

tuning parameter for the Gaussian kernel in X

complex.y

tuning parameter for the Gaussian kernel in Y

Value

gcv criterion

References

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

Examples

Run this code
# NOT RUN {
n = 50; p = 5; sigma = 1;
x = matrix(rnorm(n*p),n,p) ; err = rnorm(n)
y = (x[,1]+1)^2 + sigma*err; ex=0.01 ; ey=0.01; candidate=0.01
epsx <- gcv(x,y,candidate,"ex", "categorical",1,1)
epsy <- gcv(x,y,candidate,"ey", "categorical",1,1)
# }

Run the code above in your browser using DataLab