\HeaderA{gamSim}{Simulate example data for GAMs}{gamSim}
\keyword{models}{gamSim}
\keyword{smooth}{gamSim}
\keyword{regression}{gamSim}
\begin{Description}\relax
Function used to simulate data sets to illustrate the use of 
\code{\LinkA{gam}{gam}} and \code{\LinkA{gamm}{gamm}}. Mostly used in help files to keep down 
the length of the example code sections.
\end{Description}
\begin{Usage}
\begin{verbatim}gamSim(eg=1,n=400,dist="normal",scale=2)\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{eg}] numeric value specifying the example required.
\item[\code{n}] number of data to simulate.
\item[\code{dist}] character string which may be used to spcify the distribution of
the response.
\item[\code{scale}] Used to set noise level.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
See the source code for exactly what is simulated in each case. 
\Itemize{
\item[1] Gu and Wahba 4 univariate term example.
\item[2] A smooth function of 2 variables.
\item[3] Example with continuous by variable.
\item[4] Example with factor by variable.
\item[5] An additive example plus a factor variable.
\item[6] Additive + random effect.
\item[7] As 1 but with correlated covariates.
}
\end{Details}
\begin{Value}
Depends on \code{eg}, but usually a dataframe, which may also contain some information on 
the underlying truth. Sometimes a list with more items, including a data frame for model fitting.
See source code or helpfile examples where the function is used for further information.
\end{Value}
\begin{Author}\relax
Simon N. Wood \email{simon.wood@r-project.org}
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{gam}{gam}}, \code{\LinkA{gamm}{gamm}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## see ?gam
\end{ExampleCode}
\end{Examples}

