diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2021-01-12 16:31:08 +0000 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2021-01-12 16:31:08 +0000 |
| commit | 4c49fabae8e6c4392dd6afa0c0be8731b16f1cee (patch) | |
| tree | 4a0c1ce0017207f07ff5963433624f83f885f3fb | |
| parent | Update cran comments (diff) | |
| download | sparsestep-4c49fabae8e6c4392dd6afa0c0be8731b16f1cee.tar.gz sparsestep-4c49fabae8e6c4392dd6afa0c0be8731b16f1cee.zip | |
| -rw-r--r-- | README.md | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -43,8 +43,7 @@ the [lasso2](https://cran.r-project.org/web/packages/lasso2/index.html) package. First we load the data and create a data matrix and outcome vector: ```r -> prostate <- -> read.table("http://statweb.stanford.edu/~tibs/ElemStatLearn/datasets/prostate.data") +> prostate <- read.table("http://statweb.stanford.edu/~tibs/ElemStatLearn/datasets/prostate.data") > X <- prostate[prostate$train == T, c(-1, -10)] > X <- as.matrix(X) > y <- prostate[prostate$train == T, 1] @@ -127,8 +126,7 @@ transform the input data and disable the intercept: Note that since we add the constant through the data matrix it is subject to regularization and therefore sparsity: - + For more information and examples, please see the documentation included with the package. In particular, the following pages are good places to start: |
