Description Usage Arguments Value Examples

View source: R/carrot_functions.R

Function which computes the sum of predictors' weights for each subset containing a fixed number of predictors

1 | ```
sum_weights_sub(a,m,we,st)
``` |

`a` |
an |

`m` |
number of elements in each subset of indices |

`we` |
array of weights of the predictors |

`st` |
a subset of predictors to be always included into a predictive model |

Returns an array of weights for predictors defined by each colun of the matrix `a`

1 2 3 4 5 | ```
#all two-element subsets of the set 1:3
a<-combn(3,2)
sum_weights_sub(a,2,c(1,2,1))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.