suquan: Fit a supervised quantiled linear model.

Description Usage Arguments Value Examples

View source: R/suquan.R

Description

Fit a generalized linear model via penalized maximum likelihood, with joint optimization of full quantile normalization.

Usage

1
2
3
suquan(x, y, family = c("gaussian", "binomial"), penalty = "elasticnet",
  lambda = 1, intercept = TRUE, f_init = NULL, maxiter = 10,
  eps = 1e-06, use.glmnet = TRUE, opts = list())

Arguments

x

The input matrix, each row is a sample, each column a feature.

y

The response variable. Quantitative for family="gaussian", binary with values +1 and -1 for family="binomial"

family

The response type. For family="gaussian", ...

penalty

The penalty type.

lambda

The scaling of the penalty (default 1)

intercept

Should intercept(s) be fitted (default=TRUE) or set to zero (FALSE)

f_init

The initial distribution for the quantile transformation (default is a Gaussian cdf)

maxiter

Maximum number of times the optimization loop (once in the quantile distribution and once in the model) is performed (default 10)

eps

Stopping criterion: the loop will stop when the norm of the difference between the quantile distribution after two successive optimization is smaller than eps (default 1e-6)

use.glmnet

Whether the glmnet package should be used to fit the model for a given quantile distribution. If FALSE, then the less optimized apg optimizer is used (default TRUE).

opts

List of parameters, which must include:

Value

toto

Examples

1
2
3
4
5
6
n <- 100
p <- 40
x <- matrix(rnorm(n*p),n,p)
y <- rbinom(n,1,0.5)*2-1
lambda <- 0.2*max(abs(crossprod(y,x)))/n
m <- suquan(x, y, family="gaussian", penalty="elasticnet", opts=list(alpha=0))

jpvert/suquan documentation built on May 19, 2019, 11:51 p.m.