% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calculatePower.R
\name{calculatePower}
\alias{calculatePower}
\title{calculatePower}
\usage{
calculatePower(data, design, model, power_param)
}
\arguments{
\item{data}{Input data frame with columns having all the necessary information regarding the dependent and independent variables of interest}

\item{design}{an object of class RMeDesign with the necessary design information about the data}

\item{model}{an object of class ProbabilityModel giving the error distribution of the data}

\item{power_param}{an object of class PowerParams giving the target parameter of interest and the other necessary parameter to perform the power estimation}
}
\value{
A power curve as a ggplot object or a power calculation result printed in a text file
}
\description{
This functions makes statistical power estimates given the data, the underlying design for it and the assumed probability model of the error distribution
}
\examples{
\donttest{
template_dir <- system.file("input_templates/cell_assay_data", package = "RMeDPower2")
data <- plate_assay_pilot_data
design <- readDesign(file.path(template_dir,"design_cell_assay.json"))
model <- readProbabilityModel(file.path(template_dir,"prob_model.json"))
power_param <- readPowerParams(file.path(template_dir,"power_param.json"))
power_res <- calculatePower(data, design, model, power_param)
}
}
