sir: sir models

Description Usage Arguments Value See Also Examples

View source: R/sir.R

Description

sir is a method used to fit sliced-inverse regression models

Usage

1
sir(Y, X, H = 10, K = 1, Ylabel = NULL)

Arguments

Y

numerical vector of size n containing the response to predict.

X

numerical matrix of dimension n by p regressors

H

integer (by default 10) which set the number of slices

K

integer (by default 1) which set the number of component taken. Only 1 is possible right now.

Ylabel

a character value containing the name of the Y varaible

Value

An object with S3 class "sir" with the following components:

beta
index
H

H parameter passed througth the function

K

K parameter passed througth the function

hopt

bandwidth value of the kernel tuned to smooth the points and predict new values. For more explaination see cv_bandwidth

Xlabels

a character vector containing the p regessor names

Ylabel

a character value containing the response variable name

x_train

the training matrix X of dimension p times n

y_train

the training response vector Y of length n

See Also

predict.sir

Examples

1
2
3
4
5
6
library(mfe)
data(indicateurs)
X <- indicateurs[, -c(1,2,3)]
Y <- indicateurs[,1]
model <- sir(X = X, Y = Y, Ylabel = colnames(indicateurs)[1])
predict(model, newdata = indicateurs[1,])

alex-conanec/OptFilBov documentation built on May 21, 2019, 9:46 a.m.