% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RegresDiscClass.r
\docType{class}
\name{RegressionDiscontinuityClass}
\alias{RegressionDiscontinuityClass}
\title{Class providing object with RegressionDiscontinuityClass}
\format{
\code{\link[R6:R6Class]{R6::R6Class}}
}
\value{
Object of \code{\link[R6:R6Class]{R6::R6Class}} with methods for Regression discontinuity analysis
}
\description{
Class providing object with RegressionDiscontinuityClass

Class providing object with RegressionDiscontinuityClass
}
\section{Methods}{

\describe{
  \item{\code{new(RegressionDiscontinuityClass)}}{This method is used to create object of this class with the next variables.}

  \item{\code{initialize(data, forcing, threshold, Z1S1, covariates)}}{This method initialize the object with the corresponding information.}
  \item{\code{full_print()}}{This method print a summary of the object.}
  \item{\code{summary_statistics_mean()}}{This method a summary of the variables based on the mean.}
  \item{\code{bandwidth_selection(typerange = "percentage", range_value = 50, num_it = 50, plot = TRUE)}}{This methods defines the type of bandwidth that will be considered for the analysis.}
  \item{\code{distribution_plot(typerange = "percentage", range_value = 25, num_it = 50, covariate, typecov)}}{This method plots the selected variables and the bandwidths.}
  \item{\code{summary_bandwidth(buffers = c(100, 500, 1000), num_it = 50)}}{This method create a table with the summary of the selected variables.}
  \item{\code{causal_effect(method = 'Sharp FEP', buffers = c(100, 500, 1000), num_it = 50, outcome = "dropout", typeoutcome, sided = "onesided", cin = 0.05, treatm_cov = self$W, num_it_fuzzy = 5, plot = TRUE)}}{This method is the main function of the package, implementing the four modes of inference on causal effects.}
}
}

\examples{
library (LRErdd)
library (R6)
library(ggplot2)

data(grants)

# Selection of the covariates of interest
cov <- c("HSTech", "hsgrade","Y2005")
# Create a RegressionDiscontinuityClass with the required information
rdo <- RegressionDiscontinuityClass$new( data = grants , forcing = "S",
                                         threshold = 15000 , Z1S1 = "lower",
                                         covariates = cov)

# New object structure
rdo
# Summary of the class
rdo$full_print()
# Summary of statistics
rdo$summary_statistics_mean()

\donttest{
rdo$bandwidth_selection(typerange="percentage",range_value=25,
                        num_it=50,plot=TRUE)

#Distributionpreandpostmatching
rdo$distribution_plot(typerange="percentage",range_value=25,
                      num_it=50,covariate="sex",typecov="binary")

# Summary of bandwidths
rdo$summary_bandwidth(buffers=c(100,500,1000),num_it=1000)


# Causal effect with the four methods :
# sharp FEP , sharp Neyman , Fuzzy Neyman and Fuzzy FEP
rdo$causal_effect(method='Sharp FEP',buffers=c(100,500,1000),
                  num_it=50,outcome="dropout",typeoutcome="binary",plot=TRUE)

rdo$causal_effect(method='Sharp Neyman',buffers=c(100,500,1000),
                  num_it=50,outcome="dropout",typeoutcome="binary",
                  sided="onesided",cin=0.05,plot=TRUE)

rdo$causal_effect(method='Fuzzy Neyman',buffers=c(100,500,1000),
                  num_it=50,outcome="dropout",typeoutcome="binary",
                  treatm_cov="W",plot=TRUE)

rdo$causal_effect(method='Fuzzy FEP',buffers=c(100,500,1000),
                  num_it=50,outcome="dropout",typeoutcome="binary",
                  sided="twosided",treatm_cov="W",num_it_fuzzy=5,
                  plot=TRUE)
}

}
\section{Public fields}{
\if{html}{\out{<div class="r6-fields">}}
\describe{
\item{\code{data}}{data frame with needed variables}

\item{\code{forcing}}{Forcing variables name in data}

\item{\code{threshold}}{The value of the cutoff}

\item{\code{Z1S1}}{lower or upper will be the corresponding to the group that will have 1 value}

\item{\code{covariates}}{Covariates that will be used}

\item{\code{A}}{Name of the variable indicating eligibility status}

\item{\code{W}}{Name of the treatment received variable}
}
\if{html}{\out{</div>}}
}
\section{Methods}{
\subsection{Public methods}{
\itemize{
\item \href{#method-RegressionDiscontinuityClass-new}{\code{RegressionDiscontinuityClass$new()}}
\item \href{#method-RegressionDiscontinuityClass-full_print}{\code{RegressionDiscontinuityClass$full_print()}}
\item \href{#method-RegressionDiscontinuityClass-summary_statistics_mean}{\code{RegressionDiscontinuityClass$summary_statistics_mean()}}
\item \href{#method-RegressionDiscontinuityClass-bandwidth_selection}{\code{RegressionDiscontinuityClass$bandwidth_selection()}}
\item \href{#method-RegressionDiscontinuityClass-distribution_plot}{\code{RegressionDiscontinuityClass$distribution_plot()}}
\item \href{#method-RegressionDiscontinuityClass-summary_bandwidth}{\code{RegressionDiscontinuityClass$summary_bandwidth()}}
\item \href{#method-RegressionDiscontinuityClass-causal_effect}{\code{RegressionDiscontinuityClass$causal_effect()}}
\item \href{#method-RegressionDiscontinuityClass-clone}{\code{RegressionDiscontinuityClass$clone()}}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-RegressionDiscontinuityClass-new"></a>}}
\if{latex}{\out{\hypertarget{method-RegressionDiscontinuityClass-new}{}}}
\subsection{Method \code{new()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RegressionDiscontinuityClass$new(data, forcing, threshold, Z1S1, covariates)}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-RegressionDiscontinuityClass-full_print"></a>}}
\if{latex}{\out{\hypertarget{method-RegressionDiscontinuityClass-full_print}{}}}
\subsection{Method \code{full_print()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RegressionDiscontinuityClass$full_print()}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-RegressionDiscontinuityClass-summary_statistics_mean"></a>}}
\if{latex}{\out{\hypertarget{method-RegressionDiscontinuityClass-summary_statistics_mean}{}}}
\subsection{Method \code{summary_statistics_mean()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RegressionDiscontinuityClass$summary_statistics_mean()}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-RegressionDiscontinuityClass-bandwidth_selection"></a>}}
\if{latex}{\out{\hypertarget{method-RegressionDiscontinuityClass-bandwidth_selection}{}}}
\subsection{Method \code{bandwidth_selection()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RegressionDiscontinuityClass$bandwidth_selection(
  typerange = "percentage",
  range_value = 50,
  num_it = 50,
  plot = TRUE
)}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-RegressionDiscontinuityClass-distribution_plot"></a>}}
\if{latex}{\out{\hypertarget{method-RegressionDiscontinuityClass-distribution_plot}{}}}
\subsection{Method \code{distribution_plot()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RegressionDiscontinuityClass$distribution_plot(
  typerange = "percentage",
  range_value = 25,
  num_it = 50,
  covariate,
  typecov
)}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-RegressionDiscontinuityClass-summary_bandwidth"></a>}}
\if{latex}{\out{\hypertarget{method-RegressionDiscontinuityClass-summary_bandwidth}{}}}
\subsection{Method \code{summary_bandwidth()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RegressionDiscontinuityClass$summary_bandwidth(
  buffers = c(100, 500, 1000),
  num_it = 50
)}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-RegressionDiscontinuityClass-causal_effect"></a>}}
\if{latex}{\out{\hypertarget{method-RegressionDiscontinuityClass-causal_effect}{}}}
\subsection{Method \code{causal_effect()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RegressionDiscontinuityClass$causal_effect(
  method = "Sharp FEP",
  buffers = c(100, 500, 1000),
  num_it = 50,
  outcome = "dropout",
  typeoutcome,
  sided = "onesided",
  cin = 0.05,
  treatm_cov = self$W,
  num_it_fuzzy = 5,
  plot = TRUE
)}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-RegressionDiscontinuityClass-clone"></a>}}
\if{latex}{\out{\hypertarget{method-RegressionDiscontinuityClass-clone}{}}}
\subsection{Method \code{clone()}}{
The objects of this class are cloneable with this method.
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RegressionDiscontinuityClass$clone(deep = FALSE)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{deep}}{Whether to make a deep clone.}
}
\if{html}{\out{</div>}}
}
}
}
