mirror of
https://github.com/prise6/aVirtualTwins.git
synced 2024-04-26 19:10:26 +02:00
Update manual
This commit is contained in:
parent
6d0d2cc2b2
commit
79cc1ecf07
|
@ -23,6 +23,8 @@ sum(is.na(sepsis.csv$survival))
|
|||
# I use random forest imputation with randomForest package with simple parameters
|
||||
# I need to make survival field as factor
|
||||
sepsis.csv$survival <- factor(sepsis.csv$survival, levels = 0:1)
|
||||
# reproducibility:
|
||||
set.seed(123)
|
||||
sepsis.imp <- with(sepsis.csv, rfImpute(y = survival, x = sepsis.csv[, -1], iter = 5, ntree = 500))
|
||||
str(sepsis.imp)
|
||||
|
||||
|
|
Binary file not shown.
|
@ -10,8 +10,14 @@ A reference class to represent difference between twin1 and twin2
|
|||
\details{
|
||||
Difft are calculated depending on the favorable outcome chosen. It is the
|
||||
second level of the outcome. For example, if the outcome is 0 and 1, the
|
||||
favorable outcome is 1. Then, \deqn{difft_i = twin1_i - twin2_i IF T_i =
|
||||
1} \deqn{ difft_i = twin2_i - twin1_i IF T_i = 0}
|
||||
favorable outcome is 1. Then, \deqn{difft_i = twin1_i - twin2_i if T_i = 1}
|
||||
\deqn{ difft_i = twin2_i - twin1_i if T_i = 0}.
|
||||
So \emph{absolute} method is :
|
||||
\deqn{P(Y = 1 | T = 1) - P(Y = 1 | T =0)}
|
||||
So \emph{relative} method is :
|
||||
\deqn{P(Y = 1 | T = 1)/P(Y = 1 | T =0)}
|
||||
So \emph{absolute} method is :
|
||||
\deqn{logit(P(Y = 1 | T = 1)) - logit(P(Y = 1 | T =0))}
|
||||
}
|
||||
\section{Fields}{
|
||||
|
||||
|
@ -22,6 +28,9 @@ favorable outcome is 1. Then, \deqn{difft_i = twin1_i - twin2_i IF T_i =
|
|||
|
||||
\item{\code{twin2}}{vector of \eqn{E(Y|T = another treatment)}}
|
||||
|
||||
\item{\code{method}}{Method available to compute difft : c("absolute", "relative",
|
||||
"logit"). Absolute is default value. See details.}
|
||||
|
||||
\item{\code{difft}}{vector of difference between twin1 and twin2}
|
||||
}}
|
||||
\section{Methods}{
|
||||
|
@ -30,6 +39,7 @@ favorable outcome is 1. Then, \deqn{difft_i = twin1_i - twin2_i IF T_i =
|
|||
\item{\code{computeDifft()}}{Compute difference between twin1 and twin2. See details.}
|
||||
}}
|
||||
\seealso{
|
||||
\code{\link{VT.forest}}, \code{\link{VT.forest.one}}, \code{\link{VT.forest.double}}
|
||||
\code{\link{VT.forest}}, \code{\link{VT.forest.one}},
|
||||
\code{\link{VT.forest.double}}
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ treatments.}
|
|||
|
||||
\item{\code{getFormula()}}{Return formula : Y~T+X1+...+Xp. Usefull for cforest function.}
|
||||
|
||||
\item{\code{getIncidences()}}{Return incidence table of data.}
|
||||
\item{\code{getIncidences(rule = NULL)}}{Return incidence table of data if rule set to NULL. Otherwise return incidence for the rule.}
|
||||
|
||||
\item{\code{getX(interactions = T, trt = NULL)}}{Return predictors (T,X,X*T,X*(1-T)). Or (T,X) if interactions is FALSE.
|
||||
If trt is not NULL, return predictors for T = trt}
|
||||
|
|
|
@ -70,7 +70,7 @@ screening field}
|
|||
\item{\code{getInfos()}}{Return infos about tree}
|
||||
|
||||
\item{\code{getRules(only.leaf = F, only.fav = F, tables = T, verbose = T,
|
||||
compete = F)}}{Retrun subgroups discovered by the tree. See details.}
|
||||
compete = F)}}{Return subgroups discovered by the tree. See details.}
|
||||
|
||||
\item{\code{run(...)}}{Compute tree with rpart parameters}
|
||||
}}
|
||||
|
|
|
@ -4,22 +4,17 @@
|
|||
\name{sepsis}
|
||||
\alias{sepsis}
|
||||
\title{Clinical Trial for Sepsis desease}
|
||||
\format{454 patients and 13 variables.
|
||||
\describe{
|
||||
\item{survival}{binary outcome}
|
||||
\item{THERAPY}{1 for active treatment, 0 for control treatment}
|
||||
\format{470 patients and 13 variables. \describe{ \item{survival}{binary
|
||||
outcome} \item{THERAPY}{1 for active treatment, 0 for control treatment}
|
||||
\item{TIMFIRST}{Time from first sepsis-organ fail to start drug}
|
||||
\item{AGE}{Patient age in years}
|
||||
\item{BLLPLAT}{Baseline local platelets}
|
||||
\item{blSOFA}{Sum of baselin sofa (cardiovascular, hematology, hepaticrenal, and respiration scores)}
|
||||
\item{BLLCREAT}{Base creatinine}
|
||||
\item{AGE}{Patient age in years} \item{BLLPLAT}{Baseline local platelets}
|
||||
\item{blSOFA}{Sum of baselin sofa (cardiovascular, hematology,
|
||||
hepaticrenal, and respiration scores)} \item{BLLCREAT}{Base creatinine}
|
||||
\item{ORGANNUM}{Number of baseline organ failures}
|
||||
\item{PRAPACHE}{Pre-infusion apache-ii score}
|
||||
\item{BLGCS}{Base GLASGOW coma scale score}
|
||||
\item{BLIL6}{Baseline serum IL-6 concentration}
|
||||
\item{PRAPACHE}{Pre-infusion apache-ii score} \item{BLGCS}{Base GLASGOW
|
||||
coma scale score} \item{BLIL6}{Baseline serum IL-6 concentration}
|
||||
\item{BLADL}{Baseline activity of daily living score}
|
||||
\item{BLLBILI}{Baseline local bilirubin}
|
||||
}}
|
||||
\item{BLLBILI}{Baseline local bilirubin} }}
|
||||
\source{
|
||||
\url{http://biopharmnet.com/wiki/Software_for_subgroup_identification_and_analysis}
|
||||
}
|
||||
|
@ -27,21 +22,25 @@
|
|||
data(sepsis)
|
||||
}
|
||||
\description{
|
||||
Simulated clinical trial with two groups treatment about sepsis desease. See details.
|
||||
Simulated clinical trial with two groups treatment about sepsis desease. See
|
||||
details.
|
||||
}
|
||||
\details{
|
||||
This dataset is taken from
|
||||
\href{http://biopharmnet.com/wiki/Software_for_subgroup_identification_and_analysis}{SIDES
|
||||
method}.
|
||||
|
||||
\code{Sepsis} contains simulated data on 454 subjects with a binary outcome
|
||||
\code{Sepsis} contains simulated data on 470 subjects with a binary outcome
|
||||
survival, that stores survival status for patient after 28 days of treatment,
|
||||
value of 1 for subjects who died after 28 days and 0 otherwise. There are 11
|
||||
covariates, listed below, all of which are numerical variables.
|
||||
|
||||
Note that contrary to the original dataset used in SIDES, missing values have
|
||||
been imputed by random forest \code{(randomForest::rfImpute())}
|
||||
been imputed by random forest \code{(randomForest::rfImpute())}. See file
|
||||
data-raw/sepsis.R for more details.
|
||||
|
||||
True subgroup is \emph{PRAPACHE <= 26 & AGE <= 49.80}
|
||||
True subgroup is \emph{PRAPACHE <= 26 & AGE <= 49.80}. \emph{NOTE:} This
|
||||
subgroup is defined with the \emph{lower} event rate (survival = 1) in
|
||||
treatement arm.
|
||||
}
|
||||
|
||||
|
|
28
man/vt.data.Rd
Normal file
28
man/vt.data.Rd
Normal file
|
@ -0,0 +1,28 @@
|
|||
% Generated by roxygen2 (4.1.1): do not edit by hand
|
||||
% Please edit documentation in R/object.wrapper.R
|
||||
\name{vt.data}
|
||||
\alias{vt.data}
|
||||
\title{Initialize virtual twins data}
|
||||
\usage{
|
||||
vt.data(dataset, outcome.field, treatment.field, interactions = TRUE, ...)
|
||||
}
|
||||
\arguments{
|
||||
\item{dataset}{data.frame representing RCT's}
|
||||
|
||||
\item{outcome.field}{name of the outcome's field in \code{dataset}}
|
||||
|
||||
\item{treatment.field}{name of the treatment's field in \code{dataset}}
|
||||
|
||||
\item{interactions}{logical. If running VirtualTwins with treatment's
|
||||
interactions, set to TRUE (default value)}
|
||||
|
||||
\item{...}{parameters of \code{\link{VT.object}}}
|
||||
}
|
||||
\value{
|
||||
\code{VT.object}
|
||||
}
|
||||
\description{
|
||||
\code{vt.data} is a wrapper of \code{\link{formatRCTDataset}} and
|
||||
\code{\link{VT.object}}.
|
||||
}
|
||||
|
Loading…
Reference in a new issue