Description Usage Arguments Value Examples
View source: R/compare_method.r
Get a fitted model selected by cross validation
1 2 |
X |
covariates (n times p matrix, n: number of entries, p: number of covariates) |
Y |
response (vector with n entries) |
intercept |
TRUE to fit the data with an intercept, FALSE to fit the data without an intercept |
fit.percent |
percentage of observations used in fitting in cross validation. Each set of subsampling data will have (n times fit.percent) observations for fitting and n times (1-fit.percent) observations for calculating the mse |
num.repeat |
number of sets of subsampling data used in cross validation |
method.names |
vector of method names to be used in cross validation. Choose among "lasso", "elastic", "relaxo", "mcp" and "scad". Default is to use all methods listed above |
num.core |
number of cores to use. Default is 1 (i.e. no parallel running) |
a list which includes the estimated coefficients (est.b) and the corresponding ordinary least square fit from stats::lm()
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.