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

Markdown files

This commit is contained in:
prise6 2015-06-10 14:38:08 +02:00
parent 05a97ff613
commit 8033da44eb
3 changed files with 47 additions and 5 deletions

View file

@ -54,11 +54,12 @@ If trt is not NULL, return predictors for T = trt}
\item{\code{switchTreatment()}}{Switch treatment value.}
}}
\examples{
\dontrun{
# Default use :
vt.o <- VT.object$new(data = my.rct.dataset)
# Getting data
vt.o$data
head(vt.o$data)
# or getting predictor with interactions
vt.o$getX(interactions = T)
@ -71,7 +72,7 @@ vt.o$getY(0)
# Print incidences
vt.o$getIncidences()
# ...
}
}
\seealso{
\code{\linkS4class{VT.difft}}

View file

@ -23,12 +23,10 @@ Maintainer: \packageMaintainer{VirtualTwins}
\references{
~~ Literature or other references for background information ~~
}
~~ Optionally other standard keywords, one per line, from file KEYWORDS in the R documentation directory ~~
\keyword{ package }
\seealso{
~~ Optional links to other man pages, e.g. ~~
~~ \code{\link[<pkg>:<pkg>-package]{<pkg>}} ~~
}
\examples{
~~ simple examples of the most important functions ~~
}

43
man/formatRCTDataset.Rd Normal file
View file

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