Description Usage Arguments Details Value Author(s) Examples

Predictive scores using k-fold cross-validation for the model developed in `pact.fit`

1 | ```
pact.cv(p, nfold)
``` |

`p` |
An object of class 'pact' |

`nfold` |
The number of folds (k) for the k-fold cross-validation. k equal to the sample size would mean a leave-one-out cross-validation |

Obtain cross-validated predictive scores for the model developed in `pact.fit`

.
In each fold of the cross-validation, a model is developed from the observations in the
training set using the same variable selection parameters as that used for the model
developed in `pact.fit`

. The estimated coefficients of the regression model developed
using training set are used to make predictions for the left out observations (test set).
This is repeated for all the folds. Scores are thus obtained for all the subjects in the dataset.
The function `eval.pact.cv`

provides various evaluation options for the cross-validated
scores.

A list with the following components

`PredScore` |
The cross-validated scores for each subject (a vector) |

`Y` |
The response variable used |

`Xf` |
The dataframe of fixed prognostic covariates |

`Xv` |
The dataframe of candidate predictive variables |

`Treatment` |
The treatment assignment indicator used |

`nCovarf` |
The number of variables in Xf |

`nCovarv` |
The number of variables in Xv |

`family` |
Type of the response variable |

`varSelect` |
The variable selection method used |

`nsig, cvfolds.varSelect, which.lambda, penalty.scaling` |
The variable selection parameters used |

`call` |
The call that produced this output |

Jyothi Subramanian and Richard Simon

Maintainer: Jyothi Subramanian <subramanianj01@gmail.com>

1 2 3 4 5 6 7 | ```
data(prostateCancer)
Y <- prostateCancer[,3:4]
Xf <- prostateCancer[,7:8]
Xv <- prostateCancer[,c(5:6,9)]
Treatment <- as.factor(prostateCancer[,2])
p <- pact.fit(Y=Y,Xf=Xf,Xv=Xv,Treatment=Treatment,family="cox",varSelect="lasso")
cv <- pact.cv(p, nfold=5)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.