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

83 lines
2.3 KiB
Plaintext
Raw Normal View History

2016-10-09 02:43:51 +02:00
% Generated by roxygen2: do not edit by hand
2015-06-02 23:33:14 +02:00
% Please edit documentation in R/object.R
\docType{class}
\name{VT.object}
\alias{VT.object}
2015-07-25 02:10:28 +02:00
\title{VT.object}
2015-06-02 23:33:14 +02:00
\description{
A Reference Class to deal with RCT dataset
}
\details{
2016-10-09 02:43:51 +02:00
Currently working with binary response only. Continous will come, one day.
2015-06-02 23:33:14 +02:00
Two-levels treatment only as well.
\code{data} field should be as described, however if virtual twins won't used
2015-06-11 13:34:55 +02:00
interactions, there is no need to transform factors. See
\link{formatRCTDataset} for more details.
2015-06-02 23:33:14 +02:00
}
\section{Fields}{
\describe{
\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.}
2015-06-11 13:34:55 +02:00
\item{\code{screening}}{Logical, set to \code{FALSE} Set to \code{TRUE} to use
\code{varimp} in trees computation.}
2015-06-02 23:33:14 +02:00
2016-10-09 02:43:51 +02:00
\item{\code{varimp}}{Character vector of important variables to use in trees
2015-06-02 23:33:14 +02:00
computation.}
2016-10-09 02:43:51 +02:00
\item{\code{delta}}{Numeric representing the difference of incidence between
2015-06-02 23:33:14 +02:00
treatments.}
2016-10-09 02:43:51 +02:00
\item{\code{type}}{Character : binary or continous. Only binary is currently
available.}
2015-06-02 23:33:14 +02:00
}}
2015-06-02 23:33:14 +02:00
\section{Methods}{
\describe{
\item{\code{computeDelta()}}{Compute delta value.}
2015-06-21 03:55:01 +02:00
\item{\code{getData(interactions = F)}}{Return dataset. If interactions is set to T, return data with treatement interactions}
2015-06-02 23:33:14 +02:00
\item{\code{getFormula()}}{Return formula : Y~T+X1+...+Xp. Usefull for cforest function.}
2015-06-21 02:29:01 +02:00
\item{\code{getIncidences(rule = NULL)}}{Return incidence table of data if rule set to NULL. Otherwise return incidence for the rule.}
2015-06-02 23:33:14 +02:00
\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}
\item{\code{getXwithInt()}}{Return predictors with interactions. Use VT.object::getX(interactions = T) instead.}
\item{\code{getY(trt = NULL)}}{Return outcome. If trt is not NULL, return outcome for T = trt.}
\item{\code{switchTreatment()}}{Switch treatment value.}
}}
2015-06-02 23:33:14 +02:00
\examples{
2015-06-10 14:38:08 +02:00
\dontrun{
2015-06-02 23:33:14 +02:00
# Default use :
vt.o <- VT.object$new(data = my.rct.dataset)
# Getting data
2015-06-10 14:38:08 +02:00
head(vt.o$data)
2015-06-02 23:33:14 +02:00
# or getting predictor with interactions
vt.o$getX(interactions = T)
# or getting X|T = 1
vt.o$getX(trt = 1)
# or getting Y|T = 0
vt.o$getY(0)
# Print incidences
vt.o$getIncidences()
2015-06-10 14:38:08 +02:00
}
2016-10-09 02:43:51 +02:00
2015-06-02 23:33:14 +02:00
}
\seealso{
2015-06-11 13:34:55 +02:00
\code{\link{VT.difft}}
2015-06-02 23:33:14 +02:00
}