1
0
Fork 0
mirror of https://github.com/prise6/aVirtualTwins.git synced 2024-04-26 19:10:26 +02:00
aVirtualTwins/man/vt.forest.Rd

72 lines
2.4 KiB
Plaintext
Raw Normal View History

2016-10-09 02:43:51 +02:00
% Generated by roxygen2: do not edit by hand
2015-07-25 02:10:28 +02:00
% Please edit documentation in R/forest.wrapper.R
\name{vt.forest}
\alias{vt.forest}
\title{Create forest to compute difft}
\usage{
vt.forest(forest.type = "one", vt.data, interactions = T,
2015-07-27 01:40:52 +02:00
method = "absolute", model = NULL, model_trt1 = NULL,
model_trt0 = NULL, ratio = 1, fold = 10, ...)
2015-07-25 02:10:28 +02:00
}
\arguments{
2016-10-09 02:43:51 +02:00
\item{forest.type}{must be a character. "one" to use VT.forest.one class.
2015-07-27 01:40:52 +02:00
"double" to use VT.forest.double. "fold" to use VT.forest.fold.}
2015-07-25 02:10:28 +02:00
2016-10-09 02:43:51 +02:00
\item{vt.data}{\code{\link{VT.object}}. Can be return of \code{vt.data()}
2015-07-27 01:40:52 +02:00
function}
2015-07-25 02:10:28 +02:00
2016-10-09 02:43:51 +02:00
\item{interactions}{logical. If running VirtualTwins with treatment's
2015-07-25 02:10:28 +02:00
interactions, set to TRUE (default value)}
2016-10-09 02:43:51 +02:00
\item{method}{character c("absolute", "relative", "logit"). See
2015-07-27 01:40:52 +02:00
\code{\link{VT.difft}}.}
2015-07-25 02:10:28 +02:00
2016-10-09 02:43:51 +02:00
\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
2015-07-27 01:40:52 +02:00
NULL, a randomForest model is grown inside the function. NULL is default.}
2016-10-09 02:43:51 +02:00
\item{model_trt1}{see model_trt0 explanation and
\code{\link{VT.forest.double}} details.}
2015-07-27 01:40:52 +02:00
2016-10-09 02:43:51 +02:00
\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
2015-07-27 01:40:52 +02:00
function. NULL is default. See \code{\link{VT.forest.double}} for details.}
\item{ratio}{numeric value that allow sampsize to be a bit controlled.
Default to 1. See \code{\link{VT.forest.fold}}.}
2016-10-09 02:43:51 +02:00
\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
2015-07-27 01:40:52 +02:00
\code{\link{VT.forest.fold}}}
\item{...}{randomForest() function parameters. Can be used for any forest.type.}
2015-07-25 02:10:28 +02:00
}
\value{
\code{VT.difft}
}
\description{
2016-10-09 02:43:51 +02:00
\code{vt.forest} is a wrapper of \code{\link{VT.forest.one}},
\code{\link{VT.forest.double}} and \code{\link{VT.forest.fold}}. With
2015-07-27 01:40:52 +02:00
parameter forest.type, any of these class can be used with its own parameter.
}
\examples{
\dontrun{
# data(sepsis)
vt.o <- vt.data(sepsis, "survival", "THERAPY", T)
2016-10-09 02:43:51 +02:00
# inside model :
2015-07-27 01:40:52 +02:00
vt.f <- vt.forest("one", vt.o)
2016-10-09 02:43:51 +02:00
# ...
# your model :
2015-07-27 01:40:52 +02:00
rf <- randomForest(y = vt.o$getY(),
x = vt.o$getX(int = T),
mtry = 3,
nodesize = 15)
vt.f <- vt.forest("one", vt.o, model = rf)
# ...
# Can also use ... parameters
vt.f <- vt.forest("one", vt.o, mtry = 3, nodesize = 15)
# ...
2016-10-09 02:43:51 +02:00
}
2015-07-25 02:10:28 +02:00
}