% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/accrual.R
\name{Generate.Accrual}
\alias{Generate.Accrual}
\title{Create An AccrualGenerator using a power law recruitment}
\usage{
Generate.Accrual(start.date, end.date, k, deterministic = FALSE,
rec.start.date = NULL)
}
\arguments{
\item{start.date}{The start of the subject accrual period}
\item{end.date}{The date the last subject is accrued so \code{B} =
\code{end.date} - \code{start.date} unless \code{rec.start.date} is used see
below}
\item{k}{The non-uniformity accrual parameter}
\item{deterministic}{Logical, if FALSE then the recruitment times
are non-stochastically chosen so that their cumulative distribution function is \code{G(t)}
otherwise they are generated by sampling random variables with a cdf \code{G(t)}}
\item{rec.start.date}{If this argument is used the subjects are still recruited between
start.date and end.date but they follow the cdf \code{G(t)=(t^k-L^k)/(B^k-L^k)} where
\code{t} is in \code{[L,B]} and \code{B = end.date - rec.start.date} and \code{L = start.date- rec.start.date}.}
}
\value{
An AccrualGenerator object which generates the required subject accruals
}
\description{
Subjects are accrued according to the c.d.f
\code{G(t)=t^k/B^k} where \code{k} is a parameter,
\code{t} is the time and \code{B} is the recruitment period.
See the predict from data vignette for further details
}