predict.qut: Make predictions from a "qut" object.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/predict.qut.R

Description

Similar to other predict methods, this function predicts fitted values from a fitted "qut" object

Usage

1
2
3
4
## S3 method for class 'qut'
predict(object, newx, mode = "glm", offset = NULL,...)
## S3 method for class 'qut'
coef(object, mode = "glm",...)

Arguments

object

fitted "qut" model object.

newx

matrix of new values for X at which predictions are to be made. Must be a matrix.

mode

make predictions with lasso coefficients (type=lasso) or with fitted glm coefficients (type=glm). Default is glm.

offset

if an offset is used in the fit, then one must be supplied for making predictions

...

not used. Other arguments to predict.

Value

a vector/matrix of fitted values

Author(s)

Jairo Diaz

See Also

qut

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
	set.seed(1234)
	x=matrix(rnorm(200*20),200,20)
	y1=x[,1]*10+rnorm(100)

	fit1=qut(y1,x,family=gaussian,sigma=1)
	predict(fit1,newx=x[1:5,])
	predict(fit1,newx=x[1:5,],mode='lasso')
	y1[1:5]
	
	coef(fit1,mode='lasso')
	coef(fit1,mode='glm')

qut documentation built on Jan. 19, 2021, 5:09 p.m.