Update manual

tags/v1.0.0 prise6 4 years ago
parent
commit
79cc1ecf07
7 changed files with 65 additions and 26 deletions
1. 3
1
data-raw/sepsis.R
2. BIN
data/sepsis.rdata
3. 13
3
man/VT.difft.Rd
4. 1
1
man/VT.object.Rd
5. 1
1
man/VT.tree.Rd
6. 19
20
man/sepsis.Rd
7. 28
0
man/vt.data.Rd

+ 3 - 1 data-raw/sepsis.RView File

 @@ -22,7 +22,9 @@ sum(is.na(sepsis.csv$survival)) 22 22  # For futures computation i need to impute missing values 23 23  # I use random forest imputation with randomForest package with simple parameters 24 24  # I need to make survival field as factor 25 -sepsis.csv$survival <- factor(sepsis.csv$survival, levels = 0:1)  25 +sepsis.csv$survival <- factor(sepsis.csv\$survival, levels = 0:1) 26 +# reproducibility: 27 +set.seed(123) 26 28  sepsis.imp <- with(sepsis.csv, rfImpute(y = survival, x = sepsis.csv[, -1], iter = 5, ntree = 500)) 27 29  str(sepsis.imp) 28 30  

+ 13 - 3 man/VT.difft.RdView File

 @@ -10,8 +10,14 @@ A reference class to represent difference between twin1 and twin2 10 10  \details{ 11 11  Difft are calculated depending on the favorable outcome chosen. It is the 12 12  second level of the outcome. For example, if the outcome is 0 and 1, the 13 -favorable outcome is 1. Then, \deqn{difft_i = twin1_i - twin2_i IF T_i = 14 -1} \deqn{ difft_i = twin2_i - twin1_i IF T_i = 0} 13 +favorable outcome is 1. Then, \deqn{difft_i = twin1_i - twin2_i if T_i = 1} 14 +\deqn{ difft_i = twin2_i - twin1_i if T_i = 0}. 15 +So \emph{absolute} method is : 16 +\deqn{P(Y = 1 | T = 1) - P(Y = 1 | T =0)} 17 +So \emph{relative} method is : 18 +\deqn{P(Y = 1 | T = 1)/P(Y = 1 | T =0)} 19 +So \emph{absolute} method is : 20 +\deqn{logit(P(Y = 1 | T = 1)) - logit(P(Y = 1 | T =0))} 15 21  } 16 22  \section{Fields}{ 17 23   @@ -22,6 +28,9 @@ favorable outcome is 1. Then, \deqn{difft_i = twin1_i - twin2_i IF T_i = 22 28   23 29  \item{\code{twin2}}{vector of \eqn{E(Y|T = another treatment)}} 24 30   31 +\item{\code{method}}{Method available to compute difft : c("absolute", "relative", 32 +"logit"). Absolute is default value. See details.} 33 + 25 34  \item{\code{difft}}{vector of difference between twin1 and twin2} 26 35  }} 27 36  \section{Methods}{ @@ -30,6 +39,7 @@ favorable outcome is 1. Then, \deqn{difft_i = twin1_i - twin2_i IF T_i = 30 39  \item{\code{computeDifft()}}{Compute difference between twin1 and twin2. See details.} 31 40  }} 32 41  \seealso{ 33 -\code{\link{VT.forest}}, \code{\link{VT.forest.one}}, \code{\link{VT.forest.double}} 42 +\code{\link{VT.forest}}, \code{\link{VT.forest.one}}, 43 + \code{\link{VT.forest.double}} 34 44  } 35 45  

+ 1 - 1 man/VT.object.RdView File

 @@ -40,7 +40,7 @@ treatments.} 40 40   41 41  \item{\code{getFormula()}}{Return formula : Y~T+X1+...+Xp. Usefull for cforest function.} 42 42   43 -\item{\code{getIncidences()}}{Return incidence table of data.} 43 +\item{\code{getIncidences(rule = NULL)}}{Return incidence table of data if rule set to NULL. Otherwise return incidence for the rule.} 44 44   45 45  \item{\code{getX(interactions = T, trt = NULL)}}{Return predictors (T,X,X*T,X*(1-T)). Or (T,X) if interactions is FALSE. 46 46  If trt is not NULL, return predictors for T = trt}

+ 1 - 1 man/VT.tree.RdView File

 @@ -70,7 +70,7 @@ screening field} 70 70  \item{\code{getInfos()}}{Return infos about tree} 71 71   72 72  \item{\code{getRules(only.leaf = F, only.fav = F, tables = T, verbose = T, 73 - compete = F)}}{Retrun subgroups discovered by the tree. See details.} 73 + compete = F)}}{Return subgroups discovered by the tree. See details.} 74 74   75 75  \item{\code{run(...)}}{Compute tree with rpart parameters} 76 76  }}

+ 19 - 20 man/sepsis.RdView File

 @@ -4,22 +4,17 @@ 4 4  \name{sepsis} 5 5  \alias{sepsis} 6 6  \title{Clinical Trial for Sepsis desease} 7 -\format{454 patients and 13 variables. 8 -\describe{ 9 - \item{survival}{binary outcome} 10 - \item{THERAPY}{1 for active treatment, 0 for control treatment} 11 - \item{TIMFIRST}{Time from first sepsis-organ fail to start drug} 12 - \item{AGE}{Patient age in years} 13 - \item{BLLPLAT}{Baseline local platelets} 14 - \item{blSOFA}{Sum of baselin sofa (cardiovascular, hematology, hepaticrenal, and respiration scores)} 15 - \item{BLLCREAT}{Base creatinine} 16 - \item{ORGANNUM}{Number of baseline organ failures} 17 - \item{PRAPACHE}{Pre-infusion apache-ii score} 18 - \item{BLGCS}{Base GLASGOW coma scale score} 19 - \item{BLIL6}{Baseline serum IL-6 concentration} 20 - \item{BLADL}{Baseline activity of daily living score} 21 - \item{BLLBILI}{Baseline local bilirubin} 22 -}} 7 +\format{470 patients and 13 variables. \describe{ \item{survival}{binary 8 + outcome} \item{THERAPY}{1 for active treatment, 0 for control treatment} 9 + \item{TIMFIRST}{Time from first sepsis-organ fail to start drug} 10 + \item{AGE}{Patient age in years} \item{BLLPLAT}{Baseline local platelets} 11 + \item{blSOFA}{Sum of baselin sofa (cardiovascular, hematology, 12 + hepaticrenal, and respiration scores)} \item{BLLCREAT}{Base creatinine} 13 + \item{ORGANNUM}{Number of baseline organ failures} 14 + \item{PRAPACHE}{Pre-infusion apache-ii score} \item{BLGCS}{Base GLASGOW 15 + coma scale score} \item{BLIL6}{Baseline serum IL-6 concentration} 16 + \item{BLADL}{Baseline activity of daily living score} 17 + \item{BLLBILI}{Baseline local bilirubin} }} 23 18  \source{ 24 19  \url{http://biopharmnet.com/wiki/Software_for_subgroup_identification_and_analysis} 25 20  } @@ -27,21 +22,25 @@ 27 22  data(sepsis) 28 23  } 29 24  \description{ 30 -Simulated clinical trial with two groups treatment about sepsis desease. See details. 25 +Simulated clinical trial with two groups treatment about sepsis desease. See 26 +details. 31 27  } 32 28  \details{ 33 29  This dataset is taken from 34 30  \href{http://biopharmnet.com/wiki/Software_for_subgroup_identification_and_analysis}{SIDES 35 31  method}. 36 32   37 -\code{Sepsis} contains simulated data on 454 subjects with a binary outcome 33 +\code{Sepsis} contains simulated data on 470 subjects with a binary outcome 38 34  survival, that stores survival status for patient after 28 days of treatment, 39 35  value of 1 for subjects who died after 28 days and 0 otherwise. There are 11 40 36  covariates, listed below, all of which are numerical variables. 41 37   42 38  Note that contrary to the original dataset used in SIDES, missing values have 43 -been imputed by random forest \code{(randomForest::rfImpute())} 39 +been imputed by random forest \code{(randomForest::rfImpute())}. See file 40 +data-raw/sepsis.R for more details. 44 41   45 -True subgroup is \emph{PRAPACHE <= 26 & AGE <= 49.80} 42 +True subgroup is \emph{PRAPACHE <= 26 & AGE <= 49.80}. \emph{NOTE:} This 43 +subgroup is defined with the \emph{lower} event rate (survival = 1) in 44 +treatement arm. 46 45  } 47 46  

+ 28 - 0 man/vt.data.RdView File

 @@ -0,0 +1,28 @@ 1 +% Generated by roxygen2 (4.1.1): do not edit by hand 2 +% Please edit documentation in R/object.wrapper.R 3 +\name{vt.data} 4 +\alias{vt.data} 5 +\title{Initialize virtual twins data} 6 +\usage{ 7 +vt.data(dataset, outcome.field, treatment.field, interactions = TRUE, ...) 8 +} 9 +\arguments{ 10 +\item{dataset}{data.frame representing RCT's} 11 + 12 +\item{outcome.field}{name of the outcome's field in \code{dataset}} 13 + 14 +\item{treatment.field}{name of the treatment's field in \code{dataset}} 15 + 16 +\item{interactions}{logical. If running VirtualTwins with treatment's 17 +interactions, set to TRUE (default value)} 18 + 19 +\item{...}{parameters of \code{\link{VT.object}}} 20 +} 21 +\value{ 22 +\code{VT.object} 23 +} 24 +\description{ 25 +\code{vt.data} is a wrapper of \code{\link{formatRCTDataset}} and 26 +\code{\link{VT.object}}. 27 +} 28 +