File: gamSim.Rd

package info (click to toggle)
mgcv 1.9-4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,476 kB
  • sloc: ansic: 14,143; makefile: 2
file content (64 lines) | stat: -rwxr-xr-x 1,673 bytes parent folder | download | duplicates (4)
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
27
28
29
30
31
32
33
34
35
36
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
64
\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,verbose=TRUE)}

%- 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 specify the distribution of
the response.}

\item{scale}{Used to set noise level.}

\item{verbose}{Should information about simulation type be printed?}
  }

\details{See the source code for exactly what is simulated in each case. 
\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.}
}
}

\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 ..