1
0
Fork 0
mirror of https://github.com/prise6/aVirtualTwins.git synced 2024-04-25 19:00:27 +02:00

Update manual

This commit is contained in:
prise6 2015-06-21 02:29:01 +02:00
parent 6d0d2cc2b2
commit 79cc1ecf07
7 changed files with 65 additions and 26 deletions

View file

@ -22,7 +22,9 @@ sum(is.na(sepsis.csv$survival))
# For futures computation i need to impute missing values # For futures computation i need to impute missing values
# I use random forest imputation with randomForest package with simple parameters # I use random forest imputation with randomForest package with simple parameters
# I need to make survival field as factor # I need to make survival field as factor
sepsis.csv$survival <- factor(sepsis.csv$survival, levels = 0:1) 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)) sepsis.imp <- with(sepsis.csv, rfImpute(y = survival, x = sepsis.csv[, -1], iter = 5, ntree = 500))
str(sepsis.imp) str(sepsis.imp)

Binary file not shown.

View file

@ -10,8 +10,14 @@ A reference class to represent difference between twin1 and twin2
\details{ \details{
Difft are calculated depending on the favorable outcome chosen. It is the 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 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 = favorable outcome is 1. Then, \deqn{difft_i = twin1_i - twin2_i if T_i = 1}
1} \deqn{ difft_i = twin2_i - twin1_i IF T_i = 0} \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}{ \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{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} \item{\code{difft}}{vector of difference between twin1 and twin2}
}} }}
\section{Methods}{ \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.} \item{\code{computeDifft()}}{Compute difference between twin1 and twin2. See details.}
}} }}
\seealso{ \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}}
} }

View file

@ -40,7 +40,7 @@ treatments.}
\item{\code{getFormula()}}{Return formula : Y~T+X1+...+Xp. Usefull for cforest function.} \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. \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} If trt is not NULL, return predictors for T = trt}

View file

@ -70,7 +70,7 @@ screening field}
\item{\code{getInfos()}}{Return infos about tree} \item{\code{getInfos()}}{Return infos about tree}
\item{\code{getRules(only.leaf = F, only.fav = F, tables = T, verbose = T, \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} \item{\code{run(...)}}{Compute tree with rpart parameters}
}} }}

View file

@ -4,22 +4,17 @@
\name{sepsis} \name{sepsis}
\alias{sepsis} \alias{sepsis}
\title{Clinical Trial for Sepsis desease} \title{Clinical Trial for Sepsis desease}
\format{454 patients and 13 variables. \format{470 patients and 13 variables. \describe{ \item{survival}{binary
\describe{ outcome} \item{THERAPY}{1 for active treatment, 0 for control treatment}
\item{survival}{binary outcome} \item{TIMFIRST}{Time from first sepsis-organ fail to start drug}
\item{THERAPY}{1 for active treatment, 0 for control treatment} \item{AGE}{Patient age in years} \item{BLLPLAT}{Baseline local platelets}
\item{TIMFIRST}{Time from first sepsis-organ fail to start drug} \item{blSOFA}{Sum of baselin sofa (cardiovascular, hematology,
\item{AGE}{Patient age in years} hepaticrenal, and respiration scores)} \item{BLLCREAT}{Base creatinine}
\item{BLLPLAT}{Baseline local platelets} \item{ORGANNUM}{Number of baseline organ failures}
\item{blSOFA}{Sum of baselin sofa (cardiovascular, hematology, hepaticrenal, and respiration scores)} \item{PRAPACHE}{Pre-infusion apache-ii score} \item{BLGCS}{Base GLASGOW
\item{BLLCREAT}{Base creatinine} coma scale score} \item{BLIL6}{Baseline serum IL-6 concentration}
\item{ORGANNUM}{Number of baseline organ failures} \item{BLADL}{Baseline activity of daily living score}
\item{PRAPACHE}{Pre-infusion apache-ii score} \item{BLLBILI}{Baseline local bilirubin} }}
\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}
}}
\source{ \source{
\url{http://biopharmnet.com/wiki/Software_for_subgroup_identification_and_analysis} \url{http://biopharmnet.com/wiki/Software_for_subgroup_identification_and_analysis}
} }
@ -27,21 +22,25 @@
data(sepsis) data(sepsis)
} }
\description{ \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{ \details{
This dataset is taken from This dataset is taken from
\href{http://biopharmnet.com/wiki/Software_for_subgroup_identification_and_analysis}{SIDES \href{http://biopharmnet.com/wiki/Software_for_subgroup_identification_and_analysis}{SIDES
method}. 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, 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 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. covariates, listed below, all of which are numerical variables.
Note that contrary to the original dataset used in SIDES, missing values have 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
View 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}}.
}