Predict method for objects of class sprinter

Share:

Description

Evaluates the linear predictor from a Cox proportional Hazards model fitted by sprinter.

Usage

1
2
## S3 method for class 'sprinter'
predict(object, newdata=NULL,...)

Arguments

object

Cox proportional Hazards model from a sprinter call.

newdata

n.new * p matrix with new covariate values. If just prediction for the training data is wanted, it can be omitted.

...

additional arguments.

Value

The linear predictor, a vector of length n.new, is returned.

Author(s)

Isabell Hoffmann isabell.hoffmann@uni-mainz.de

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
simulation <- simul.int(287578,n = 200, p = 500,
                          beta.int = 1.0,
                          beta.main = 0.9, 
                          censparam = 1/20, 
                          lambda = 1/20)
data <- simulation$data    
simulation$info

set.seed(123)

## Not run: 
testcb <- sprinter( x=data[,1:500],  
                    time = data$obs.time,
                    status= data$obs.status,
                    repetitions = 10,
                    mandatory = c("ID1","ID2"),
                    n.inter.candidates = 1000, 
                    screen.main = fit.CoxBoost, 
                    fit.final = fit.CoxBoost, 
                    args.screen.main = list(seed=123,stepno = 10, K = 10, 
                                            criterion ='pscore', nu = 0.05),
                    parallel = FALSE, trace=TRUE)
summary(testcb)


# true coefficients:
# Clin.cov1   Clin.cov2   ID5:ID6   ID7:ID8
# 0.9         -0.9        1         -1

# Simulate New Data:
newSimulation <- simul.int(12345,n = 200, p = 500,
                          beta.int = 1.0,
                          beta.main = 0.9, 
                          censparam = 1/20, 
                          lambda = 1/20)
newdata <- newSimulation$data    
newSimulation$info

predict(testcb, newdata = newdata[,1:500]) 

## End(Not run)