two_stage: Two-stage log-ratio lasso

Description Usage Arguments Value

Description

Fits the two-stage log-ratio lasso.

Usage

1
2
two_stage(z, y, k_max = 20, lambda_1 = NULL, second.stage = c("y",
  "yhat"), ...)

Arguments

z

The input matrix. Assumed to be the logarithmic transform of positive raw inputs.

y

The real-valued response.

k_max

The largest number of log-ratios to consider.

lambda_1

Optional vector of lambda values.

second.stage

Specifies whether to fit the second stage on the response y or the fitted values yhat. Fitting on yhat is known as "conservative two-stage" in the log-ratio lasso paper.

...

Additional arguments passed to "glmnet.constr".

Value

beta A list of p by k_max matrices where column j gives the coefficient value after j steps. each list entry corresponds to a value of lambda.

coef. The theta coefficients selected for each model. Recommended for internal use only.

lambda The grid of lambda values used for the fitting.

selected_vars A matrix showing which log-terms are active at each step of the second-stage forward stepwise procedure.


stephenbates19/logratiolasso documentation built on May 18, 2019, 4:52 p.m.