% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/twoPhase.R
\name{twoPhase}
\alias{twoPhase}
\title{Internal function to optimize over a range of maf, LD and betas.}
\usage{
twoPhase(
  beta = c(1, 1, 1),
  maf_G = 0.1,
  LD = 0.3,
  data = NA,
  n2 = NA,
  design_formula = Y ~ G + Z,
  family = gaussian(),
  useGeneticAlgorithm = FALSE
)
}
\arguments{
\item{beta}{Vector of betas (length of 3, corresponding to intercept, effect size for G, effect size for Z).}

\item{maf_G}{Maf for G (numeric, ranging from 0 to 1).}

\item{LD}{Correlation r betweek G and Z (numeric, ranging from -1 to 1, r value).}

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

\item{n2}{Phase 2 sample size}

\item{design_formula}{Formula for the regression model, default is Y ~ G + Z. Z is the GWAS SNP, G is the sequence variant. Y is outcome.}

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

\item{useGeneticAlgorithm}{If TRUE, use genetic algorithm in addition to Lagrange multiplier approach (slower). Default: FALSE}
}
\value{
sth
}
\description{
Internal function to optimize over a range of maf, LD and betas.
}
\examples{

data = twoPhase()

}
