LIB_PLANN: Library of the Super Learner for Survival Neural Network...

View source: R/LIB_PLANN.R

LIB_PLANNR Documentation

Library of the Super Learner for Survival Neural Network Based on the PLANN Method

Description

Fit a neural network based on the partial logistic regression.

Usage

LIB_PLANN(times, failures, group=NULL, cov.quanti=NULL, cov.quali=NULL,
data, inter, size, decay, maxit, MaxNWts)

Arguments

times

The name of the variable related the numeric vector with the follow-up times.

failures

The name of the variable related the numeric vector with the event indicators (0=right censored, 1=event).

group

The name of the variable related to the exposure/treatment. This variable shall have only two modalities encoded 0 for the untreated/unexposed patients and 1 for the treated/exposed ones. The default value is NULL: no specific exposure/treatment is considered. When a specific exposure/treatment is considered, it will be forced in the algorithm or related interactions will be tested when possible.

cov.quanti

The name(s) of the variable(s) related to the possible quantitative covariates. These variables must be numeric.

cov.quali

The name(s) of the variable(s) related to the possible qualitative covariates. These variables must be numeric with two levels: 0 and 1. A complete disjunctive form must be used for covariates with more levels.

data

A data frame for training the model in which to look for the variables related to the status of the follow-up time (times), the event (failures), the optional treatment/exposure (group) and the covariables included in the previous model (cov.quanti and cov.quali).

inter

The length of the intervals.

size

The number of units in the hidden layer.

decay

The parameter for weight decay.

maxit

The maximum number of iterations.

MaxNWts

The maximum allowable number of weights.

Details

This function is based is based on the survivalPLANN from the related package.

Value

model

The estimated model.

group

The name of the variable related to the exposure/treatment.

cov.quanti

The name(s) of the variable(s) related to the possible quantitative covariates.

cov.quali

The name(s) of the variable(s) related to the possible qualitative covariates.

data

The data frame used for learning. The first column is entitled times and corresponds to the observed follow-up times. The second column is entitled failures and corresponds to the event indicators. The other columns correspond to the predictors.

times

A vector of numeric values with the times of the predictions.

predictions

A matrix with the predictions of survivals of each subject (lines) for each observed time (columns).

References

Biganzoli E, Boracchi P, Mariani L, and et al. Feed forward neural networks for the analysis of censored survival data: a partial logistic regression approach. Stat Med, 17:1169-86, 1998.

Examples

data(dataDIVAT2)

# The neural network based from the first 300 individuals of the data base

model <- LIB_PLANN(times="times", failures="failures", data=dataDIVAT2[1:300,],
  cov.quanti=c("age"),  cov.quali=c("hla", "retransplant", "ecd"),
  inter=0.5, size=32, decay=0.01, maxit=100, MaxNWts=10000)

# The predicted survival of the first subject of the training sample
plot(y=model$predictions[1,], x=model$times, xlab="Time (years)",
ylab="Predicted survival", col=1, type="l", lty=1, lwd=2, ylim=c(0,1))

survivalSL documentation built on April 4, 2025, 3:55 a.m.