get_indices {CARRoT}R Documentation

Best regression

Description

Function which identifies regressions with the highest predictive power

Usage

get_indices(predsp,nvar,c,we,st,minx)

Arguments

predsp

An M x N matrix of averaged out predictive power values. M is maximum feasible number of variables included in a regression, N is the maximum feasible number of regressions of the fixed size; the row index indicates the number of variables included in a regression.

nvar

array of maximal number of variables for each cross-validation

c

array of all indices of the prediction variables

we

array of all weights of the prediction variables

st

a subset of predictors to be always included into a predictive model

minx

minimum number of predictors, defaults to 1

Value

A list of arrays which contain indices of the predictors corresponfing to the best regressions

See Also

Uses sum_weights_sub, find_sub, combn

Examples

#creating a set of averaged out predictive powers

predsp<-matrix(NA,ncol=3,nrow=3)

predsp[1,]=runif(3,0.7,0.8)
predsp[2,]=runif(3,0.65,0.85)
predsp[3,1]=runif(1,0.4,0.5)

#running the function

get_indices(predsp,c(3,3,3),1:3,c(1,1,1))

[Package CARRoT version 3.0.2 Index]