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

Added description and export

This commit is contained in:
prise6 2015-06-11 13:34:55 +02:00
parent abfded6c96
commit d51852e7f2
13 changed files with 87 additions and 54 deletions

View file

@ -3,7 +3,7 @@ Type: Package
Title: Adaptation of Virtual Twins method from Jared Foster.
Version: 0.0.0.1000
Date: 2015-05-31
Author: François Vieille
Author: Francois Vieille
Maintainer: <vieille.francois@gmail.com>
Description: Research of subgroups in random clinical trials with binary
outcome and two treatments groups.

View file

@ -1,5 +1,11 @@
# Generated by roxygen2 (4.1.1): do not edit by hand
export(VT.difft)
export(VT.forest.double)
export(VT.forest.one)
export(VT.object)
export(VT.tree.class)
export(VT.tree.reg)
export(formatRCTDataset)
import(methods)
importClassesFrom(party,RandomForest)

View file

@ -0,0 +1,24 @@
#' VirtualTwins : An adapation of VirtualTwins method created by Jared Foster.
#'
#' VirtualTwins is written mainly with reference classes. Briefly, there is three kinds of class :
#' \itemize{
#' \item \code{\link{VT.object}} class to represent RCT dataset used by VirtualTwins. 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.tree}} class to find subgroups from \code{\link{difft}} by CART trees. \code{\link{VT.tree.class}} and \code{\link{VT.tree.reg}} extend it.
#' }
#'
#' @section TODO LIST:
#' \emph{last update : 11.06.2015}
#' \itemize{
#' \item More detailed documentation and vignettes
#' \item Write wrappers for classes
#' \item Write examples
#' \item ...
#' }
#'
#' @docType package
#' @name VirtualTwins
#' @aliases VirtualTwins-package
#'
NULL

View file

@ -17,6 +17,8 @@
#'
#' @name VT.difft
#'
#' @export VT.difft
#'
#' @seealso \code{\link{VT.forest}}, \code{\link{VT.forest.one}}, \code{\link{VT.forest.double}}
#'
#' @import methods

View file

@ -23,11 +23,13 @@
#' 1
#' @field model_trt0 a caret/RandomForest/randomForest object for treatment T =
#' 0
#' @field ... field from parent class : \linkS4class{VT.forest}
#' @field ... field from parent class : \code{\link{VT.forest}}
#'
#' @seealso \code{\link{VT.difft}}, \code{\link{VT.forest}},
#' \code{\link{VT.forest.one}}
#'
#' @export VT.forest.double
#'
#' @name VT.forest.double
#'
#' @import methods

View file

@ -22,6 +22,8 @@
#'
#' @name VT.forest.one
#'
#' @export VT.forest.one
#'
#' @import methods
VT.forest.one <- setRefClass(
Class = "VT.forest.one",

View file

@ -4,19 +4,18 @@
#'
#' A Reference Class to deal with RCT dataset
#'
#' 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.
#'
#' \code{data} field should be as described, however if virtual twins won't used
#' interactions, there is no need to transform factors. A tool function to
#' transform factor will come soon.
#' interactions, there is no need to transform factors. See
#' \link{formatRCTDataset} for more details.
#'
#'
#' @field data Data.frame with format: \eqn{Y,T,X_{1}, \ldots, X_{p}}. Y must be
#' two levels factor if type is binary. T must be numeric or integer.
#' @field alpha Numeric, no need in this current version. Set to \code{1}.
#' @field screening Logical, set to \code{FALSE} Set to \code{TRUE} to use \code{varimp} in trees
#' computation.
#' @field screening Logical, set to \code{FALSE} Set to \code{TRUE} to use
#' \code{varimp} in trees computation.
#' @field varimp Character vector of important variables to use in trees
#' computation.
#' @field delta Numeric representing the difference of incidence between
@ -28,6 +27,8 @@
#'
#' @name VT.object
#'
#' @export VT.object
#'
#' @examples
#' \dontrun{
#' # Default use :
@ -49,14 +50,13 @@
#' vt.o$getIncidences()
#' }
#'
#' @seealso \code{\linkS4class{VT.difft}}
#' @seealso \code{\link{VT.difft}}
#'
VT.object <- setRefClass(
Class = "VT.object",
fields = list(
data = "data.frame",
alpha = "numeric",
screening = "logical",
varimp = "character",
delta = "numeric",
@ -64,14 +64,12 @@ VT.object <- setRefClass(
),
methods = list(
initialize = function(screening = F, alpha = 1, type = "binary", ...){
initialize = function(screening = F, type = "binary", ...){
.self$screening <- screening
.self$type <- type
.self$alpha <- alpha
.self$initFields(...)
},

View file

@ -8,6 +8,8 @@
#'
#' @name VT.tree.class
#'
#' @export VT.tree.class
#'
#' @import methods
VT.tree.class <- setRefClass(
Class = "VT.tree.class",

View file

@ -6,6 +6,8 @@
#'
#' @include tree.R
#'
#' @export VT.tree.reg
#'
#' @name VT.tree.reg
VT.tree.reg <- setRefClass(

View file

@ -29,7 +29,7 @@ This is what \code{computeTwin2()} does.
\item{\code{model_trt0}}{a caret/RandomForest/randomForest object for treatment T =
0}
\item{\code{...}}{field from parent class : \linkS4class{VT.forest}}
\item{\code{...}}{field from parent class : \code{\link{VT.forest}}}
}}
\section{Methods}{

View file

@ -12,8 +12,8 @@ Currently working with binary response only. Continous will come, one day.
Two-levels treatment only as well.
\code{data} field should be as described, however if virtual twins won't used
interactions, there is no need to transform factors. A tool function to
transform factor will come soon.
interactions, there is no need to transform factors. See
\link{formatRCTDataset} for more details.
}
\section{Fields}{
@ -21,10 +21,8 @@ transform factor will come soon.
\item{\code{data}}{Data.frame with format: \eqn{Y,T,X_{1}, \ldots, X_{p}}. Y must be
two levels factor if type is binary. T must be numeric or integer.}
\item{\code{alpha}}{Numeric, no need in this current version. Set to \code{1}.}
\item{\code{screening}}{Logical, set to \code{FALSE} Set to \code{TRUE} to use \code{varimp} in trees
computation.}
\item{\code{screening}}{Logical, set to \code{FALSE} Set to \code{TRUE} to use
\code{varimp} in trees computation.}
\item{\code{varimp}}{Character vector of important variables to use in trees
computation.}
@ -75,6 +73,6 @@ vt.o$getIncidences()
}
}
\seealso{
\code{\linkS4class{VT.difft}}
\code{\link{VT.difft}}
}

View file

@ -1,32 +0,0 @@
\name{VirtualTwins-package}
\alias{VirtualTwins-package}
\alias{VirtualTwins}
\docType{package}
\title{
\packageTitle{VirtualTwins}
}
\description{
\packageDescription{VirtualTwins}
}
\details{
The DESCRIPTION file:
\packageDESCRIPTION{VirtualTwins}
\packageIndices{VirtualTwins}
~~ An overview of how to use the package, including the most important functions ~~
}
\author{
\packageAuthor{VirtualTwins}
Maintainer: \packageMaintainer{VirtualTwins}
}
\references{
~~ Literature or other references for background information ~~
}
\keyword{ package }
\seealso{
~~ \code{\link[<pkg>:<pkg>-package]{<pkg>}} ~~
}
\examples{
}

29
man/VirtualTwins.Rd Normal file
View file

@ -0,0 +1,29 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/VirtualTwins.R
\docType{package}
\name{VirtualTwins}
\alias{VirtualTwins}
\alias{VirtualTwins-package}
\title{VirtualTwins : An adapation of VirtualTwins method created by Jared Foster.}
\description{
VirtualTwins is written mainly with reference classes. Briefly, there is three kinds of class :
\itemize{
\item \code{\link{VT.object}} class to represent RCT dataset used by VirtualTwins. 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.tree}} class to find subgroups from \code{\link{difft}} by CART trees. \code{\link{VT.tree.class}} and \code{\link{VT.tree.reg}} extend it.
}
}
\details{
\encoding{UTF-8}
}
\section{TODO LIST}{
\emph{last update : 11.06.2015}
\itemize{
\item More detailed documentation and vignettes
\item Write wrappers for classes
\item Write examples
\item ...
}
}