Last chance! 50% off unlimited learning
Sale ends in
Function which computes the sum of predictors' weights for each subset containing a fixed number of predictors
sum_weights_sub(a,m,we,st)
Returns an array of weights for predictors defined by each colun of the matrix a
an m
x N matrix, containing all possible subsets (N overall) of the size m
of predictors' indices; therefore each column of a
defines a unique subset of the predictors
number of elements in each subset of indices
array of weights of the predictors
a subset of predictors to be always included into a predictive model
#all two-element subsets of the set 1:3
a<-combn(3,2)
sum_weights_sub(a,2,c(1,2,1))
Run the code above in your browser using DataLab