diff --git a/R/difft.R b/R/difft.R index 252307b..6eb6f48 100644 --- a/R/difft.R +++ b/R/difft.R @@ -1,12 +1,23 @@ -#' A reference class to represent difference between twin1 and twin2 -#' -#' @include object.R +#' Difference between twins #' +#' A reference class to represent difference between twin1 and twin2 +#' +#' 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 +#' 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} +#' +#' @include object.R +#' #' @field vt.object VT.object (refClass) representing data -#' @field twin1 vector of \eqn{E(Y|T= real treatment)} -#' @field twin2 vector of \eqn{E(Y|T= antoher treatment)} -#' @field difft vector of difference between twin1 and twin2 +#' @field twin1 vector of \eqn{E(Y|T = real treatment)} +#' @field twin2 vector of \eqn{E(Y|T = anoher treatment)} +#' @field difft vector of difference between twin1 and twin2 +#' +#' @name VT.difft +#' +#' @seealso \code{\link{VT.forest}}, \code{\link{VT.forest.one}}, \code{\link{VT.forest.double}} #' #' @import methods VT.difft <- setRefClass( @@ -30,7 +41,7 @@ VT.difft <- setRefClass( }, computeDifft = function(){ - "Compute difference between twin1 and twin2" + "Compute difference between twin1 and twin2. See details." if(sum(is.na(.self$twin1)) != 0 | sum(is.na(.self$twin2)) != 0 ) stop("Twins must be valid") diff --git a/man/VT.difft-class.Rd b/man/VT.difft-class.Rd deleted file mode 100644 index 826a6f6..0000000 --- a/man/VT.difft-class.Rd +++ /dev/null @@ -1,27 +0,0 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand -% Please edit documentation in R/difft.R -\docType{class} -\name{VT.difft-class} -\alias{VT.difft} -\alias{VT.difft-class} -\title{A reference class to represent difference between twin1 and twin2} -\description{ -A reference class to represent difference between twin1 and twin2 -} -\section{Fields}{ - -\describe{ -\item{\code{vt.object}}{VT.object (refClass) representing data} - -\item{\code{twin1}}{vector of \eqn{E(Y|T= real treatment)}} - -\item{\code{twin2}}{vector of \eqn{E(Y|T= antoher treatment)}} - -\item{\code{difft}}{vector of difference between twin1 and twin2} -}} -\section{Methods}{ - -\describe{ -\item{\code{computeDifft()}}{Compute difference between twin1 and twin2} -}} - diff --git a/man/VT.difft.Rd b/man/VT.difft.Rd new file mode 100644 index 0000000..1320639 --- /dev/null +++ b/man/VT.difft.Rd @@ -0,0 +1,35 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/difft.R +\docType{class} +\name{VT.difft} +\alias{VT.difft} +\title{Difference between twins} +\description{ +A reference class to represent difference between twin1 and twin2 +} +\details{ +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 +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} +} +\section{Fields}{ + +\describe{ +\item{\code{vt.object}}{VT.object (refClass) representing data} + +\item{\code{twin1}}{vector of \eqn{E(Y|T = real treatment)}} + +\item{\code{twin2}}{vector of \eqn{E(Y|T = anoher treatment)}} + +\item{\code{difft}}{vector of difference between twin1 and twin2} +}} +\section{Methods}{ + +\describe{ +\item{\code{computeDifft()}}{Compute difference between twin1 and twin2. See details.} +}} +\seealso{ +\code{\link{VT.forest}}, \code{\link{VT.forest.one}}, \code{\link{VT.forest.double}} +} +