Skip to content
Permalink
3fcdd3ab97
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Latest commit e3247f7 Aug 8, 2020 History
1 contributor

Users who have contributed to this file

58 lines (48 sloc) 1.79 KB
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/use_cv_coxglmnet.R
\name{use_cv_coxglmnet}
\alias{use_cv_coxglmnet}
\title{Penalized Cox Regression With Nested CV}
\usage{
use_cv_coxglmnet(
summarized_experiment,
model_matrix = NULL,
variables = NULL,
add_survival = T,
stratify = T,
alpha = 0.5,
time_to_event = "days_to_death",
time_follow_censor = "days_to_last_follow_up",
event = "vital_status",
parallel = T,
k_outer_loop = 10,
k_inner_loop = 5,
seed = 12,
verbose = F,
time_surv = NULL,
...
)
}
\arguments{
\item{summarized_experiment}{A SummarizedExperiment object}
\item{add_survival}{Logical - add columns to data for survival anaylsis}
\item{stratify}{Logical - stratify events in folds?}
\item{time_to_event}{Character - column name of time to the event (e.g. death, relapse)}
\item{time_follow_censor}{Character - column name of time of last follow up or right censoring}
\item{event}{Character - column name of event (vital_status)}
\item{seed}{Integer - Number for set.seed}
\item{verbose}{Logical - state progress}
\item{time_surv}{Numeric - Time of survival to calculate cauc (needs to be on the same scale)}
\item{...}{Parameters for glmnet}
\item{vari/bles}{Character Vector - column names of used variables}
}
\value{
Returns either a SummarizedExperiment or a data frame with 2 additional columns in colData (time, event). May have fewer rows because of missing data.
}
\description{
This function calulates penalized cox regression with nested cross validation
}
\details{
If no model_matrix is omitted you can hand over column names of which a model matrix is created from. Either model_matrix or variables must not be NULL. Addionally you need to specify the column names for mmRmeta::add_coldata_survival
if add_survival == TRUE.
}