predict.suquan: Predict with a supervised quantiled linear model.

Description Usage Arguments Value Examples

View source: R/predict.suquan.R

Description

Make prediction on new samples with a quantiled linear model.

Usage

1
2
## S3 method for class 'suquan'
predict(m, x)

Arguments

m

The model, a list that contains three fields: f, the quantile function, b, the linear model, b0, the intercept

x

Samples (one per row) for which the prediction is made.

Value

A vector of predictions, for all samples.

Examples

1
2
3
4
5
6
7
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))
predict.suquan(m,x)

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