% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/twoPhase.R
\name{twoPhaseHeuristic}
\alias{twoPhaseHeuristic}
\title{Select samples for phase 2 under heuristic designs.}
\usage{
twoPhaseHeuristic(
  design = c("pps", "bal", "comb"),
  ndraws = 1,
  data = NA,
  n2 = NA,
  family = gaussian(),
  S = NULL,
  perc_Y = c(1/5, 4/5)
)
}
\arguments{
\item{design}{Heuristic design to use for phase 2 sample selection. One of probability proportional to size ("pps"), balanced ("bal") or combined ("comb") allocations. Default: "pps".}

\item{ndraws}{Number of draws of the heuristic design to generate Default: 1.}

\item{data}{Data frame with Y and Z variables.}

\item{n2}{Phase 2 sample size.}

\item{family}{Distrubution of the outcome. Default: gaussian(). Familes available for glm can be used here. See help(stats::family) for examples.}

\item{S}{stratification of the outcome Y. Optional. Should be a numeric vector with strata categories (e.g. 1 1 2 2 3 3 ). If present, its length must be equal to the number of rows in data. Default: NULL. Needed when Y does not render itself into strata, e.g. Gaussian, Poisson, Gamma.}

\item{perc_Y}{vector of percentiles in increasing order for which the outcome Y will be stratified. Default: c(1/5,4/5). Only used when S is NA. Note that setting up S is strongly suggested.

Note that in this version strata are always defined in terms of Z and S, i.e. a joint design, future implementations may relax this by allowing for only S or only Z (marginal designs, outcome- or covariate-dependent, respectively)}
}
\value{
sth
}
\description{
Select samples for phase 2 under heuristic designs.
}
