# predict.lars.glm: Function to make predictions from lars.glm fit In covTest: Computes covariance test for adaptive linear modelling

## Description

Function to make predictions from lars.glm fit

## Usage

 ```1 2``` ```## S3 method for class 'lars.glm' predict(object, x, lambda, time=NULL, status = NULL, ...) ```

## Arguments

 `object`

Result of call to lars.glm

 `x` N by p matrix of predictors `lambda` Value of L1- regularization parameter at which predictions are desired `time` Optional N-vector of survival times, required for Cox Proportional hazards model. `status` Optional N-vector of censoring indicators, required for Cox Proportional hazards model. 1=failed; 0=censored. `...` additional arguments (not used)

## Value

Vector of predicted values, on the linear predictor scale.

Rob Tibshirani

## References

Park, M.Y. and Hastie, T. (2007) 1l regularization path algorithm for generalized linear models. JRSSB B 69(4), 659-677

lars.glm, covTest

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13``` ```#logistic x=matrix(rnorm(100*10),ncol=10) x=scale(x,TRUE,TRUE)/sqrt(99) y=4*x[,2]+rnorm(100) y=1*(y>0) a=lars.glm(x,y,family="binomial") yhat=predict.lars.glm(a,x,family="binomial") # Cox model #y=6*x[,2]+rnorm(100)+10 #status=sample(c(0,1),size=length(y),replace=TRUE) #a=lars.glm(x,y,status=status,family="cox") #yhat=predict.lars.glm(a,x,family="cox") ```

### Example output

```Loading required package: lars