SurvGPR_Predict: Predict log-survival time with Gaussian process regression...

Description Usage Arguments Value

Description

A function for prediction based on an object of class "SurvGRP"; models fit by SurvGPR. See github.com/ajmolstad/SurvGPR for examples.

Usage

1
SurvGPR_Predict(results, barT, Z.full, K.full, train.inds, test.inds, times=NULL)

Arguments

results

An object of class "SurvGPR" obtained from fitting a model using SurvGPR.

barT

A vector of length n_{\rm train} to be used for prediction. This should contain the log-survival times of the training (and/or their imputed values). If the training data is that which we used to fit the “result” object, this should be the Tout object.

Z.full

A matrix of dimension (n_{\rm train} + n_{\rm test}) \times q with the same covariates (arranged in the same order) as Z used to obtain “results”. Note that n_{\rm train} must be the dimension of barT.

K.full

Kernel matrices corresponding to the first M variance components of results$sigma2 – an array of dimension (n_{\rm train} + n_{\rm test}) \times (n_{\rm train} + n_{\rm test}) \times M.

train.inds

The indices of Z.full and K.full which correspond to the training data. Note that barT must be ordered so that its elements correspond to the train.inds.

test.inds

The indices of Z.full and K.full which correspond to the test data, i.e., the data for which we want to make predictions.

times

A vector of times (on the original scale) at which we want to evaluate a survival function for the testing data.

Value

test.inds

The indices of Z.full and K.full which correspond to the test data, i.e., the data for which we made predictions.

log.pred

The predicted log-survival times for the testing subjects.

survFunc

An n_{\rm test} \times {\rm length}(\texttt{times}) matrix containing the estimated survival curves. The kth row is the estimated survival curve for the kth subject in the testing data evaluated at the inputed times.


ajmolstad/SurvGPR documentation built on Jan. 8, 2022, 2:38 p.m.