% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/DataGeneration.R
\name{DataGeneration_TPD}
\alias{DataGeneration_TPD}
\title{This code a function that generates a sample Y, Z, G given some initial parameters.}
\usage{
DataGeneration_TPD(
  Beta0 = 2,
  Beta1 = 0.5,
  Disp = 1,
  N = 5000,
  LD.r = 0.75,
  P_g = 0.2,
  P_z = 0.3,
  family = gaussian(),
  tao = 2/5
)
}
\arguments{
\item{Beta0}{intercept  Default 2}

\item{Beta1}{genetic effect   Default 0.5}

\item{Disp}{dispersion parameter, e.g., variance of the error term when family is \code{gaussian()}, the reciprocal of the shape parameter when family is \code{Gamma()} Default: 1}

\item{N}{Phase 1 sample size, i.e. GWAS data (Default: 5000)}

\item{LD.r}{linkage disequilibrium (r) between G and Z  (Default: 0.75)}

\item{P_g}{minor allele frequency for G, the causal SNP}

\item{P_z}{minor allele frequency for Z, the GWAS SNP}

\item{family}{member of the exponential family (see \code{\link{family}};\sQuote{quasi} models not available). Default \code{gaussian()}.}

\item{tao}{quantile value to define the stratification of the response variable, Y (only applicable when family is \code{gaussian()}) (default: 2/5)}
}
\value{
A dataframe with complete data Y, G, Z, S, where G and Z come from the same haplotype determined by P_g, P_z and LD.r; Y is generated from E[Y|G] = family$linkinv(Beta0 + Beta1 x G). S is a 3 level variable determined by Y, Beta1, Disp and tao (only returned when family is gaussian). the function iterates across generated datasets until Z and Y are associated at a suggestive genome wide threshold of p<=1e-05.
}
\description{
This code a function that generates a sample Y, Z, G given some initial parameters.
}
\examples{

data = DataGeneration_TPD()

}
