Description Usage Arguments Details Value Author(s) Examples
Predicts the scores for new subjects from a previously developed object of class 'pact'
1 2 |
object |
The object returned from |
newxv |
The dataframe Xv of covariates for the new subjects for whom predictions are to be made |
... |
Other arguments to 'predict' |
Returns the scores for new subjects from an object of class 'pact', given their covariate values and treatment assignment.
A numeric vector containing the predicted scores for the new subjects from the fitted model is returned
Jyothi Subramanian and Richard Simon
Maintainer: Jyothi Subramanian <subramanianj01@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ### Survival response
data(prostateCancer)
Y <- prostateCancer[1:400,3:4]
Xf <- prostateCancer[1:400,7:8]
Xv <- prostateCancer[1:400,c(5:6,9)]
Treatment <- as.factor(prostateCancer[1:400,2])
p <- pact.fit(Y=Y, Xf=Xf, Xv=Xv, Treatment=Treatment, family="cox", varSelect="univar")
newxv <- prostateCancer[401:410,c(5:6,9)]
predict(p, newxv)
### Binary response
data(EORTC10994)
Y <- as.factor(EORTC10994[1:120,4])
Xv <- EORTC10994[1:120,c(2,5:7)]
Treatment <- as.factor(EORTC10994[1:120,3])
p <- pact.fit(Y=Y,Xv=Xv,Treatment=Treatment,family="binomial",varSelect="none")
newxv <- EORTC10994[121:125,c(2,5:7)]
predict(p, newxv)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.