gamSim.Rd 1.55 KB
 Dirk Eddelbuettel committed Apr 10, 2018 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 \name{gamSim} \alias{gamSim} %- Also NEED an \alias' for EACH other topic documented here. \title{Simulate example data for GAMs} \description{ Function used to simulate data sets to illustrate the use of \code{\link{gam}} and \code{\link{gamm}}. Mostly used in help files to keep down the length of the example code sections. } \usage{gamSim(eg=1,n=400,dist="normal",scale=2)} %- maybe also usage' for other objects documented here. \arguments{ \item{eg}{ numeric value specifying the example required.} \item{n}{ number of data to simulate.} \item{dist}{character string which may be used to spcify the distribution of the response.} \item{scale}{Used to set noise level.} } \details{See the source code for exactly what is simulated in each case.  Dirk Eddelbuettel committed Apr 10, 2018 27 28 29 30 31 32 33 34 \enumerate{ \item{Gu and Wahba 4 univariate term example.} \item{A smooth function of 2 variables.} \item{Example with continuous by variable.} \item{Example with factor by variable.} \item{An additive example plus a factor variable.} \item{Additive + random effect.} \item{As 1 but with correlated covariates.}  Dirk Eddelbuettel committed Apr 10, 2018 35 36 } }  Dirk Eddelbuettel committed Apr 10, 2018 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63  \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.} \author{ Simon N. Wood \email{simon.wood@r-project.org}} \seealso{ \code{\link{gam}}, \code{\link{gamm}}} \examples{ ## see ?gam } \keyword{models} \keyword{smooth} \keyword{regression}%-- one or more ..