1
0
Fork 0
mirror of https://github.com/prise6/aVirtualTwins.git synced 2024-05-02 19:53:09 +02:00

update md files

This commit is contained in:
François Vieille 2016-10-09 02:43:51 +02:00
parent e5e2f1b442
commit 5942b328e7
15 changed files with 110 additions and 102 deletions

View file

@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/difft.R % Please edit documentation in R/difft.R
\docType{class} \docType{class}
\name{VT.difft} \name{VT.difft}
@ -8,8 +8,8 @@
A reference class to represent difference between twin1 and twin2 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 = 1} 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}. \deqn{ difft_i = twin2_i - twin1_i if T_i = 0}.
So \emph{absolute} method is : So \emph{absolute} method is :

View file

@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/forest.double.R % Please edit documentation in R/forest.double.R
\docType{class} \docType{class}
\name{VT.forest.double} \name{VT.forest.double}
@ -11,7 +11,7 @@ A reference class to compute twins via double random forests
\code{VT.forest.double} extends \code{VT.forest}. \code{VT.forest.double} extends \code{VT.forest}.
\eqn{E(Y|T = 1)} if \eqn{T_i = 1} is estimated by OOB predictions from \eqn{E(Y|T = 1)} if \eqn{T_i = 1} is estimated by OOB predictions from
\code{model_trt1}. \code{model_trt1}.
\eqn{E(Y|T = 0)} if \eqn{T_i = 0} is estimated by OOB predictions from \eqn{E(Y|T = 0)} if \eqn{T_i = 0} is estimated by OOB predictions from
\code{model_trt0}. \code{model_trt0}.
This is what \code{computeTwin1()} does. This is what \code{computeTwin1()} does.

View file

@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/forest.fold.R % Please edit documentation in R/forest.fold.R
\docType{class} \docType{class}
\name{VT.forest.fold} \name{VT.forest.fold}
@ -11,13 +11,13 @@ A reference class to compute twins via k random forest
\code{VT.forest.fold} extends \code{VT.forest} \code{VT.forest.fold} extends \code{VT.forest}
Twins are estimated by k-fold cross validation. A forest is computed on k-1/k Twins are estimated by k-fold cross validation. A forest is computed on k-1/k
of the data and then used to estimate twin1 and twin2 on 1/k of the left of the data and then used to estimate twin1 and twin2 on 1/k of the left
data. data.
} }
\section{Fields}{ \section{Fields}{
\describe{ \describe{
\item{\code{interactions}}{logical set TRUE if model has been computed with \item{\code{interactions}}{logical set TRUE if model has been computed with
interactions} interactions}
\item{\code{fold}}{numeric, number of fold, i.e. number of forest (k)} \item{\code{fold}}{numeric, number of fold, i.e. number of forest (k)}
@ -34,7 +34,7 @@ interactions}
\item{\code{run()}}{Compute twin1 and twin2 estimation. Switch treatment if necessary.} \item{\code{run()}}{Compute twin1 and twin2 estimation. Switch treatment if necessary.}
}} }}
\seealso{ \seealso{
\code{\link{VT.difft}}, \code{\link{VT.forest}}, \code{\link{VT.difft}}, \code{\link{VT.forest}},
\code{\link{VT.forest.one}}, \code{\link{VT.forest.double}} \code{\link{VT.forest.one}}, \code{\link{VT.forest.double}}
} }

View file

@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/forest.one.R % Please edit documentation in R/forest.one.R
\docType{class} \docType{class}
\name{VT.forest.one} \name{VT.forest.one}
@ -10,8 +10,8 @@ A reference class to compute twins via one random forest
\details{ \details{
\code{VT.forest.one} extends \code{VT.forest}. \code{VT.forest.one} extends \code{VT.forest}.
OOB predictions are used to estimate \eqn{E(Y|T = real treatment)}. Then, OOB predictions are used to estimate \eqn{E(Y|T = real treatment)}. Then,
treatement is switched, it means that 1 becomes 0 and 0 becomes 1. We use treatement is switched, it means that 1 becomes 0 and 0 becomes 1. We use
again \code{model} to estimate \eqn{E(Y|T = the other treatment)}. This is again \code{model} to estimate \eqn{E(Y|T = the other treatment)}. This is
what \code{computeTwin1()} and \code{computeTwin2()} functions do. what \code{computeTwin1()} and \code{computeTwin2()} functions do.
} }

View file

@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/object.R % Please edit documentation in R/object.R
\docType{class} \docType{class}
\name{VT.object} \name{VT.object}
@ -8,7 +8,7 @@
A Reference Class to deal with RCT dataset A Reference Class to deal with RCT dataset
} }
\details{ \details{
Currently working with binary response only. Continous will come, one day. Currently working with binary response only. Continous will come, one day.
Two-levels treatment only as well. Two-levels treatment only as well.
\code{data} field should be as described, however if virtual twins won't used \code{data} field should be as described, however if virtual twins won't used
@ -24,14 +24,14 @@ two levels factor if type is binary. T must be numeric or integer.}
\item{\code{screening}}{Logical, set to \code{FALSE} Set to \code{TRUE} to use \item{\code{screening}}{Logical, set to \code{FALSE} Set to \code{TRUE} to use
\code{varimp} in trees computation.} \code{varimp} in trees computation.}
\item{\code{varimp}}{Character vector of important variables to use in trees \item{\code{varimp}}{Character vector of important variables to use in trees
computation.} computation.}
\item{\code{delta}}{Numeric representing the difference of incidence between \item{\code{delta}}{Numeric representing the difference of incidence between
treatments.} treatments.}
\item{\code{type}}{Character : binary or continous. Only binary is currently \item{\code{type}}{Character : binary or continous. Only binary is currently
available.} available.}
}} }}
\section{Methods}{ \section{Methods}{
@ -73,6 +73,7 @@ vt.o$getY(0)
# Print incidences # Print incidences
vt.o$getIncidences() vt.o$getIncidences()
} }
} }
\seealso{ \seealso{
\code{\link{VT.difft}} \code{\link{VT.difft}}

View file

@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/predict.R % Please edit documentation in R/predict.R
\docType{methods} \docType{methods}
\name{VT.predict} \name{VT.predict}
@ -35,7 +35,7 @@ class.}
predictions are returned.} predictions are returned.}
\item{type}{Must be binary or continous, depending on the outcome. Only \item{type}{Must be binary or continous, depending on the outcome. Only
binary is really available.} binary is really available.}
} }
\value{ \value{
vector \eqn{E(Y=1)} vector \eqn{E(Y=1)}
@ -45,16 +45,16 @@ VT.predict generic function
} }
\section{Methods (by class)}{ \section{Methods (by class)}{
\itemize{ \itemize{
\item \code{rfor = RandomForest,newdata = missing,type = character}: \item \code{rfor = RandomForest,newdata = missing,type = character}: rfor(RandomForest) newdata (missing) type (character)
\item \code{rfor = RandomForest,newdata = data.frame,type = character}: \item \code{rfor = RandomForest,newdata = data.frame,type = character}: rfor(RandomForest) newdata (data.frame) type (character)
\item \code{rfor = randomForest,newdata = missing,type = character}: \item \code{rfor = randomForest,newdata = missing,type = character}: rfor(randomForest) newdata (missing) type (character)
\item \code{rfor = randomForest,newdata = data.frame,type = character}: \item \code{rfor = randomForest,newdata = data.frame,type = character}: rfor(randomForest) newdata (data.frame) type (character)
\item \code{rfor = train,newdata = ANY,type = character}: \item \code{rfor = train,newdata = ANY,type = character}: rfor(train) newdata (ANY) type (character)
\item \code{rfor = train,newdata = missing,type = character}: \item \code{rfor = train,newdata = missing,type = character}: rfor(train) newdata (missing) type (character)
}} }}

View file

@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tree.class.R % Please edit documentation in R/tree.class.R
\docType{class} \docType{class}
\name{VT.tree.class} \name{VT.tree.class}

View file

@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tree.reg.R % Please edit documentation in R/tree.reg.R
\docType{class} \docType{class}
\name{VT.tree.reg} \name{VT.tree.reg}

View file

@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/aVirtualTwins.R % Please edit documentation in R/aVirtualTwins.R
\docType{package} \docType{package}
\name{aVirtualTwins} \name{aVirtualTwins}
@ -10,16 +10,16 @@ aVirtualTwins is written mainly with reference classes. Briefly, there is three
\itemize{ \itemize{
\item \code{\link{VT.object}} class to represent RCT dataset used by aVirtualTwins. To format correctly RCT dataset, use \code{\link{formatRCTDataset}}. \item \code{\link{VT.object}} class to represent RCT dataset used by aVirtualTwins. To format correctly RCT dataset, use \code{\link{formatRCTDataset}}.
\item \code{\link{VT.difft}} class to compute difference between twins. Family \code{\link{VT.forest}} extends it to compute twins by random forest. \item \code{\link{VT.difft}} class to compute difference between twins. Family \code{\link{VT.forest}} extends it to compute twins by random forest.
\code{\link{vt.forest()}} is users function. \code{\link{vt.forest}} is users function.
\item \code{\link{VT.tree}} class to find subgroups from \code{difft} by CART trees. \code{\link{VT.tree.class}} and \code{\link{VT.tree.reg}} extend it. \item \code{\link{VT.tree}} class to find subgroups from \code{difft} by CART trees. \code{\link{VT.tree.class}} and \code{\link{VT.tree.reg}} extend it.
\code{\link{vt.tree()}} is users function. \code{\link{vt.tree}} is users function.
} }
} }
\section{TODO LIST}{ \section{TODO LIST}{
\emph{last update : 27.07.2015} \emph{last update : 27.07.2015}
\itemize{ \itemize{
\item More detailed documentation and vignettes \item More detailed documentation and vignettes
\item Write examples \item Write examples
\item ... \item ...
} }

View file

@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/formatRCTDataset.R % Please edit documentation in R/formatRCTDataset.R
\name{formatRCTDataset} \name{formatRCTDataset}
\alias{formatRCTDataset} \alias{formatRCTDataset}
@ -14,30 +14,33 @@ formatRCTDataset(dataset, outcome.field, treatment.field, interactions = TRUE)
\item{treatment.field}{name of the treatment'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 \item{interactions}{logical. If running VirtualTwins with treatment's
interactions, set to TRUE (default value)} interactions, set to TRUE (default value)}
} }
\value{ \value{
return data.frame with good format (explained in details section) to run VirtualTwins return data.frame with good format (explained in details section) to run VirtualTwins
} }
\description{ \description{
\code{formatRCTDataset} returns dataset that Virtual Twins is able to \code{formatRCTDataset} returns dataset that Virtual Twins is able to
analyze. analyze.
} }
\details{ \details{
This function check these differents topic: Outcome must be binary and a This function check these differents topic: Outcome must be binary and a
factor. If numeric with two distincts values, outcome becomes a factor where factor. If numeric with two distincts values, outcome becomes a factor where
the favorable reponse is the second level. Also, outcome is moved on the the favorable reponse is the second level. Also, outcome is moved on the
first column of \code{dataset}. first column of \code{dataset}.
Treatment must have two distinct numeric values, 0 : no treatment, 1 : Treatment must have two distinct numeric values, 0 : no treatment, 1 :
treatment. Treatment is moved to the second column. treatment. Treatment is moved to the second column.
Qualitatives variables must be factor. If it has more than two levels, if Qualitatives variables must be factor. If it has more than two levels, if
running VirtualTwins with interaction, it creates dummy variables. running VirtualTwins with interaction, it creates dummy variables.
} }
\examples{ \examples{
\dontrun{ \dontrun{
data.format <- formatRCTDataset(data, "outcome", "treatment", TRUE) data.format <- formatRCTDataset(data, "outcome", "treatment", TRUE)
} }
} }

View file

@ -1,45 +1,45 @@
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R % Please edit documentation in R/data.R
\docType{data} \docType{data}
\name{sepsis} \name{sepsis}
\alias{sepsis} \alias{sepsis}
\title{Clinical Trial for Sepsis desease} \title{Clinical Trial for Sepsis desease}
\format{470 patients and 13 variables. \describe{ \item{survival}{binary \format{470 patients and 13 variables. \describe{ \item{survival}{binary
outcome} \item{THERAPY}{1 for active treatment, 0 for control treatment} outcome} \item{THERAPY}{1 for active treatment, 0 for control treatment}
\item{TIMFIRST}{Time from first sepsis-organ fail to start drug} \item{TIMFIRST}{Time from first sepsis-organ fail to start drug}
\item{AGE}{Patient age in years} \item{BLLPLAT}{Baseline local platelets} \item{AGE}{Patient age in years} \item{BLLPLAT}{Baseline local platelets}
\item{blSOFA}{Sum of baselin sofa (cardiovascular, hematology, \item{blSOFA}{Sum of baselin sofa (cardiovascular, hematology,
hepaticrenal, and respiration scores)} \item{BLLCREAT}{Base creatinine} hepaticrenal, and respiration scores)} \item{BLLCREAT}{Base creatinine}
\item{ORGANNUM}{Number of baseline organ failures} \item{ORGANNUM}{Number of baseline organ failures}
\item{PRAPACHE}{Pre-infusion apache-ii score} \item{BLGCS}{Base GLASGOW \item{PRAPACHE}{Pre-infusion apache-ii score} \item{BLGCS}{Base GLASGOW
coma scale score} \item{BLIL6}{Baseline serum IL-6 concentration} coma scale score} \item{BLIL6}{Baseline serum IL-6 concentration}
\item{BLADL}{Baseline activity of daily living score} \item{BLADL}{Baseline activity of daily living score}
\item{BLLBILI}{Baseline local bilirubin} }} \item{BLLBILI}{Baseline local bilirubin} }}
\source{ \source{
\url{http://biopharmnet.com/wiki/Software_for_subgroup_identification_and_analysis} \url{http://biopharmnet.com/subgroup-analysis-software/}
} }
\usage{ \usage{
data(sepsis) data(sepsis)
} }
\description{ \description{
Simulated clinical trial with two groups treatment about sepsis desease. See Simulated clinical trial with two groups treatment about sepsis desease. See
details. 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/subgroup-analysis-software/}{SIDES
method}. method}.
\code{Sepsis} contains simulated data on 470 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())}. See file been imputed by random forest \code{(randomForest::rfImpute())}. See file
data-raw/sepsis.R for more details. data-raw/sepsis.R for more details.
True subgroup is \emph{PRAPACHE <= 26 & AGE <= 49.80}. \emph{NOTE:} This True subgroup is \emph{PRAPACHE <= 26 & AGE <= 49.80}. \emph{NOTE:} This
subgroup is defined with the \emph{lower} event rate (survival = 1) in subgroup is defined with the \emph{lower} event rate (survival = 1) in
treatement arm. treatement arm.
} }

View file

@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/object.wrapper.R % Please edit documentation in R/object.wrapper.R
\name{vt.data} \name{vt.data}
\alias{vt.data} \alias{vt.data}
@ -13,7 +13,7 @@ vt.data(dataset, outcome.field, treatment.field, interactions = TRUE, ...)
\item{treatment.field}{name of the treatment'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 \item{interactions}{logical. If running VirtualTwins with treatment's
interactions, set to TRUE (default value)} interactions, set to TRUE (default value)}
\item{...}{parameters of \code{\link{VT.object}}} \item{...}{parameters of \code{\link{VT.object}}}
@ -22,7 +22,7 @@ interactions, set to TRUE (default value)}
\code{VT.object} \code{VT.object}
} }
\description{ \description{
\code{vt.data} is a wrapper of \code{\link{formatRCTDataset}} and \code{vt.data} is a wrapper of \code{\link{formatRCTDataset}} and
\code{\link{VT.object}}. Allows to format your data.frame in order to create \code{\link{VT.object}}. Allows to format your data.frame in order to create
a VT.object object. a VT.object object.
} }
@ -31,5 +31,6 @@ a VT.object object.
data(sepsis) data(sepsis)
formatRCTdataset(sepsis, "survival", "THERAPY", T) formatRCTdataset(sepsis, "survival", "THERAPY", T)
} }
} }

View file

@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/forest.wrapper.R % Please edit documentation in R/forest.wrapper.R
\name{vt.forest} \name{vt.forest}
\alias{vt.forest} \alias{vt.forest}
@ -9,34 +9,34 @@ vt.forest(forest.type = "one", vt.data, interactions = T,
model_trt0 = NULL, ratio = 1, fold = 10, ...) model_trt0 = NULL, ratio = 1, fold = 10, ...)
} }
\arguments{ \arguments{
\item{forest.type}{must be a character. "one" to use VT.forest.one class. \item{forest.type}{must be a character. "one" to use VT.forest.one class.
"double" to use VT.forest.double. "fold" to use VT.forest.fold.} "double" to use VT.forest.double. "fold" to use VT.forest.fold.}
\item{vt.data}{\code{\link{VT.object}}. Can be return of \code{vt.data()} \item{vt.data}{\code{\link{VT.object}}. Can be return of \code{vt.data()}
function} function}
\item{interactions}{logical. If running VirtualTwins with treatment's \item{interactions}{logical. If running VirtualTwins with treatment's
interactions, set to TRUE (default value)} interactions, set to TRUE (default value)}
\item{method}{character c("absolute", "relative", "logit"). See \item{method}{character c("absolute", "relative", "logit"). See
\code{\link{VT.difft}}.} \code{\link{VT.difft}}.}
\item{model}{allows to give a model you build outside this function. Can be \item{model}{allows to give a model you build outside this function. Can be
randomForest, train or cforest. Is only used with forest.type = "one". If randomForest, train or cforest. Is only used with forest.type = "one". If
NULL, a randomForest model is grown inside the function. NULL is default.} NULL, a randomForest model is grown inside the function. NULL is default.}
\item{model_trt1}{see model_trt0 explanation and \item{model_trt1}{see model_trt0 explanation and
\code{\link{VT.double.forest}} details.} \code{\link{VT.forest.double}} details.}
\item{model_trt0}{works the same as model parameter. Is only used with \item{model_trt0}{works the same as model parameter. Is only used with
forest.type = "double". If NULL, a randomForest model is grown inside the forest.type = "double". If NULL, a randomForest model is grown inside the
function. NULL is default. See \code{\link{VT.forest.double}} for details.} function. NULL is default. See \code{\link{VT.forest.double}} for details.}
\item{ratio}{numeric value that allow sampsize to be a bit controlled. \item{ratio}{numeric value that allow sampsize to be a bit controlled.
Default to 1. See \code{\link{VT.forest.fold}}.} Default to 1. See \code{\link{VT.forest.fold}}.}
\item{fold}{number of fold you want to construct forest with k-fold method. \item{fold}{number of fold you want to construct forest with k-fold method.
Is only used with forest.type = "fold". Default to 5. See Is only used with forest.type = "fold". Default to 5. See
\code{\link{VT.forest.fold}}} \code{\link{VT.forest.fold}}}
\item{...}{randomForest() function parameters. Can be used for any forest.type.} \item{...}{randomForest() function parameters. Can be used for any forest.type.}
@ -45,18 +45,18 @@ Is only used with forest.type = "fold". Default to 5. See
\code{VT.difft} \code{VT.difft}
} }
\description{ \description{
\code{vt.forest} is a wrapper of \code{\link{VT.forest.one}}, \code{vt.forest} is a wrapper of \code{\link{VT.forest.one}},
\code{\link{VT.forest.double}} and \code{\link{VT.forest.fold}}. With \code{\link{VT.forest.double}} and \code{\link{VT.forest.fold}}. With
parameter forest.type, any of these class can be used with its own parameter. parameter forest.type, any of these class can be used with its own parameter.
} }
\examples{ \examples{
\dontrun{ \dontrun{
# data(sepsis) # data(sepsis)
vt.o <- vt.data(sepsis, "survival", "THERAPY", T) vt.o <- vt.data(sepsis, "survival", "THERAPY", T)
# inside model : # inside model :
vt.f <- vt.forest("one", vt.o) vt.f <- vt.forest("one", vt.o)
# ... # ...
# your model : # your model :
rf <- randomForest(y = vt.o$getY(), rf <- randomForest(y = vt.o$getY(),
x = vt.o$getX(int = T), x = vt.o$getX(int = T),
mtry = 3, mtry = 3,
@ -66,6 +66,7 @@ parameter forest.type, any of these class can be used with its own parameter.
# Can also use ... parameters # Can also use ... parameters
vt.f <- vt.forest("one", vt.o, mtry = 3, nodesize = 15) vt.f <- vt.forest("one", vt.o, mtry = 3, nodesize = 15)
# ... # ...
} }
} }

View file

@ -1,34 +1,34 @@
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tools.R % Please edit documentation in R/tools.R
\name{vt.subgroups} \name{vt.subgroups}
\alias{vt.subgroups} \alias{vt.subgroups}
\title{Visualize subgroups} \title{Visualize subgroups}
\usage{ \usage{
vt.subgroups(vt.trees, only.leaf = T, only.fav = T, tables = F, vt.subgroups(vt.trees, only.leaf = T, only.fav = T, tables = F,
verbose = F) verbose = F, compete = F)
} }
\arguments{ \arguments{
\item{vt.trees}{\code{\link{VT.tree}} object. Or return of \item{vt.trees}{\code{\link{VT.tree}} object. Or return of
\code{\link{vt.tree}} function. Can be a list.} \code{\link{vt.tree}} function. Can be a list.}
\item{only.leaf}{logical to select only leaf of trees. TRUE is default.} \item{only.leaf}{logical to select only leaf of trees. TRUE is default.}
\item{only.fav}{logical select only favorable subgroups (meaning with \item{only.fav}{logical select only favorable subgroups (meaning with
favorable label of the tree). TRUE is default.} favorable label of the tree). TRUE is default.}
\item{tables}{set to TRUE if tables of incidence must be shown. FALSE is \item{tables}{set to TRUE if tables of incidence must be shown. FALSE is
default.} default.}
\item{verbose}{print infos during computation. FALSE is default.} \item{verbose}{print infos during computation. FALSE is default.}
\item{compete}{print competitors rules thanks to competitors computation of \item{compete}{print competitors rules thanks to competitors computation of
the tree} the tree}
} }
\value{ \value{
data.frame of rules data.frame of rules
} }
\description{ \description{
Function which uses \code{\link{VT.tree}} intern functions. Package Function which uses \code{\link{VT.tree}} intern functions. Package
rpart.plot must be loaded. See \code{\link{VT.tree}} for details. rpart.plot must be loaded. See \code{\link{VT.tree}} for details.
} }
\examples{ \examples{
@ -42,7 +42,8 @@ rpart.plot must be loaded. See \code{\link{VT.tree}} for details.
# show subgroups # show subgroups
vt.subgroups(vt.tr) vt.subgroups(vt.tr)
# change options you'll be surprised ! # change options you'll be surprised !
vt.subgroups(vt.tr, verbose = T, tables = T) vt.subgroups(vt.tr, verbose = T, tables = T)
} }
} }

View file

@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tree.wrapper.R % Please edit documentation in R/tree.wrapper.R
\name{vt.tree} \name{vt.tree}
\alias{vt.tree} \alias{vt.tree}
@ -8,16 +8,16 @@ vt.tree(tree.type = "class", vt.difft, sens = ">", threshold = seq(0.5,
0.8, 0.1), screening = NULL, ...) 0.8, 0.1), screening = NULL, ...)
} }
\arguments{ \arguments{
\item{tree.type}{must be a character. "class" for classification tree, "reg" \item{tree.type}{must be a character. "class" for classification tree, "reg"
for regression tree.} for regression tree.}
\item{vt.difft}{\code{\link{VT.difft}} object. Or return of \item{vt.difft}{\code{\link{VT.difft}} object. Or return of
\code{\link{vt.forest}} function.} \code{\link{vt.forest}} function.}
\item{sens}{must be a character c(">","<"). See \code{\link{VT.tree}} for \item{sens}{must be a character c(">","<"). See \code{\link{VT.tree}} for
details.} details.}
\item{threshold}{must be numeric. It can be a unique value or a vector. If \item{threshold}{must be numeric. It can be a unique value or a vector. If
numeric vector, a list is returned. See \code{\link{VT.tree}} for details.} numeric vector, a list is returned. See \code{\link{VT.tree}} for details.}
\item{screening}{must be logical. If TRUE, only varimp variables of VT.object \item{screening}{must be logical. If TRUE, only varimp variables of VT.object
@ -26,23 +26,23 @@ is used to create the tree.}
\item{...}{rpart() function parameters. Can be used for any tree.type.} \item{...}{rpart() function parameters. Can be used for any tree.type.}
} }
\value{ \value{
\code{VT.tree} or a list of \code{VT.tree} depending on threshold \code{VT.tree} or a list of \code{VT.tree} depending on threshold
dimension. See examples. dimension. See examples.
} }
\description{ \description{
\code{vt.tree} is a wrapper of \code{\link{VT.tree.class}} and \code{vt.tree} is a wrapper of \code{\link{VT.tree.class}} and
\code{\link{VT.tree.reg}}. With parameter tree.type, any of these two class \code{\link{VT.tree.reg}}. With parameter tree.type, any of these two class
can be used with its own parameter. can be used with its own parameter.
} }
\details{ \details{
See \code{\link{VT.tree}}, \code{\link{VT.tree.class}} and See \code{\link{VT.tree}}, \code{\link{VT.tree.class}} and
\code{\link{VT.tree.reg}} classes. \code{\link{VT.tree.reg}} classes.
} }
\examples{ \examples{
\dontrun{ \dontrun{
# data(sepsis) # data(sepsis)
vt.o <- vt.data(sepsis, "survival", "THERAPY", T) vt.o <- vt.data(sepsis, "survival", "THERAPY", T)
# inside model : # inside model :
vt.f <- vt.forest("one", vt.o) vt.f <- vt.forest("one", vt.o)
# use classification tree # use classification tree
vt.tr <- vt.tree("class", vt.f, threshold = c(0.01, 0.05)) vt.tr <- vt.tree("class", vt.f, threshold = c(0.01, 0.05))
@ -54,5 +54,6 @@ See \code{\link{VT.tree}}, \code{\link{VT.tree.class}} and
vt.tr$tree1$getInfos() vt.tr$tree1$getInfos()
# ... # ...
} }
} }