other: Analysis functions for manuscript

Description Usage Arguments Details See Also Examples

Description

Functions for the palasso manuscript.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
.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, ...)

Arguments

X

covariates: matrix with n rows and p columns

filter

numeric, multiplying the sample size

cutoff

character "zero", "knee", or "half"

scale

logical

x

covariates: list of length k, including matrices with n rows and p columns

effects

number of causal covariates: vector of length k

y

response: vector of length n

nfolds.ext

number of external folds

...

arguments for palasso

index

indices of causal covariates: list of length k, including vectors

trial

development option

Details

.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.

See Also

Use palasso to fit the paired lasso.

Examples

1
2
3
4
5
6
7
8
## 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)

palasso documentation built on April 19, 2021, 5:07 p.m.