other | R Documentation |
Functions for the palasso
manuscript.
.prepare(X, filter = 1, cutoff = "zero", scale = TRUE)
.simulate(x, effects)
.predict(
y,
X,
nfolds.ext = 5,
nfolds.int = 5,
adaptive = TRUE,
standard = TRUE,
elastic = TRUE,
shrink = TRUE,
family = "binomial",
...
)
.select(y, X, index, nfolds = 5, standard = TRUE, adaptive = TRUE, ...)
X |
covariates:
matrix with |
filter |
numeric, multiplying the sample size |
cutoff |
character "zero", "knee", or "half" |
scale |
logical |
x |
covariates:
list of length |
effects |
number of causal covariates:
vector of length |
y |
response:
vector of length |
nfolds.ext |
number of external folds |
... |
arguments for palasso |
index |
indices of causal covariates:
list of length |
.prepare
:
pre-processes sequencing data by
removing features with a low total abundance,
and adjusting for different library sizes;
obtains two transformations of the same data
by (1) binarising the counts with some cutoff
and (2) taking the Anscombe transform;
scales all covariates to mean zero and unit variance.
.simulate
:
simulates the response by
exploiting two experimental covariate matrices;
allows for different numbers of non-zero coefficients for X and Z.
.predict
:
estimates the predictive performance of different lasso models
(standard X and/or Z, adaptive X and/or Z, paired X and Z);
minimises the loss function "deviance", but also returns other loss functions;
supports logistic and Cox regression.
.select
:
estimates the selective performance of different lasso models
(standard X and/or Z, adaptive X and/or Z, paired X and Z);
limits the number of covariates to 10
;
returns the number of selected covariates,
and the number of correctly selected covariates.
Use palasso to fit the paired lasso.
## Not run: set.seed(1)
n <- 30; p <- 40
X <- matrix(rpois(n*p,lambda=3),nrow=n,ncol=p)
x <- palasso:::.prepare(X)
y <- palasso:::.simulate(x,effects=c(1,2))
predict <- palasso:::.predict(y,x)
select <- palasso:::.select(y,x,attributes(y))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.