-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathgamlss.scope.Rd
executable file
·64 lines (51 loc) · 2.34 KB
/
gamlss.scope.Rd
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{gamlss.scope}
\alias{gamlss.scope}
\title{Generate a Scope Argument for Stepwise GAMLSS}
\description{
Generates a scope argument for a stepwise GAMLSS.
}
\usage{
gamlss.scope(frame, response = 1, smoother = "cs", arg = NULL, form = TRUE)
}
\arguments{
\item{frame}{a data or model frame}
\item{response}{ which variable is the response; the default is the first}
\item{smoother}{what smoother to use; default is \code{cs}}
\item{arg}{any additional arguments required by the smoother}
\item{form}{should a formula be returned (default), or else a character version of the formula }
}
\details{
Each formula describes an ordered regimen of terms, each of which is eligible on their own for
inclusion in the gam model.
One of the terms is selected from each formula by step.gam.
If a 1 is selected, that term is omitted.
}
\value{
a list of formulas is returned, one for each column in frame (excluding the response).
For a numeric variable, say x1, the formula is
~ 1 + x1 + cs(x1)
If x1 is a factor, the last smooth term is omitted.
}
\references{Chambers, J. M. and Hastie, T. J. (1991). \emph{Statistical Models in S}, Chapman and Hall, London.
Rigby, R. A. and Stasinopoulos D. M. (2005). Generalized additive models for location, scale and shape,(with discussion),
\emph{Appl. Statist.}, \bold{54}, part 3, pp 507-554.
Rigby, R. A., Stasinopoulos, D. M., Heller, G. Z., and De Bastiani, F. (2019)
\emph{Distributions for modeling location, scale, and shape: Using GAMLSS in R}, Chapman and Hall/CRC. An older version can be found in \url{https://www.gamlss.com/}.
Stasinopoulos D. M. Rigby R.A. (2007) Generalized additive models for location scale and shape (GAMLSS) in R.
\emph{Journal of Statistical Software}, Vol. \bold{23}, Issue 7, Dec 2007, \url{https://www.jstatsoft.org/v23/i07/}.
Stasinopoulos D. M., Rigby R.A., Heller G., Voudouris V., and De Bastiani F., (2017)
\emph{Flexible Regression and Smoothing: Using GAMLSS in R}, Chapman and Hall/CRC.
(see also \url{https://www.gamlss.com/}).
}
\author{Mikis Stasinopoulos: a modified function from Statistical Models in S}
\seealso{ \code{\link{stepGAIC}}}
\examples{
data(usair)
gs1<-gamlss.scope(model.frame(y~x1+x2+x3+x4+x5+x6, data=usair))
gs2<-gamlss.scope(model.frame(usair))
gs1
gs2
gs3<-gamlss.scope(model.frame(usair), smooth="fp", arg="3")
gs3
}
\keyword{regression}