mirror of
https://github.com/prise6/aVirtualTwins.git
synced 2024-05-17 22:06:33 +02:00
Difft documentation
This commit is contained in:
parent
82c56a4688
commit
f00b8835ee
25
R/difft.R
25
R/difft.R
|
@ -1,12 +1,23 @@
|
||||||
|
|
||||||
#' A reference class to represent difference between twin1 and twin2
|
#' Difference between twins
|
||||||
#'
|
|
||||||
#' @include object.R
|
|
||||||
#'
|
#'
|
||||||
|
#' 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 vt.object VT.object (refClass) representing data
|
||||||
#' @field twin1 vector of \eqn{E(Y|T= real treatment)}
|
#' @field twin1 vector of \eqn{E(Y|T = real treatment)}
|
||||||
#' @field twin2 vector of \eqn{E(Y|T= antoher treatment)}
|
#' @field twin2 vector of \eqn{E(Y|T = anoher treatment)}
|
||||||
#' @field difft vector of difference between twin1 and twin2
|
#' @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
|
#' @import methods
|
||||||
VT.difft <- setRefClass(
|
VT.difft <- setRefClass(
|
||||||
|
@ -30,7 +41,7 @@ VT.difft <- setRefClass(
|
||||||
},
|
},
|
||||||
|
|
||||||
computeDifft = function(){
|
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")
|
if(sum(is.na(.self$twin1)) != 0 | sum(is.na(.self$twin2)) != 0 ) stop("Twins must be valid")
|
||||||
|
|
||||||
|
|
|
@ -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}
|
|
||||||
}}
|
|
||||||
|
|
35
man/VT.difft.Rd
Normal file
35
man/VT.difft.Rd
Normal file
|
@ -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}}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue