terms.bamlss.Rd
Extract terms.object
s for BAMLSS.
# S3 method for bamlss
terms(x, specials = NULL, data = NULL,
model = NULL, pterms = TRUE, sterms = TRUE,
drop = TRUE, ...)
# S3 method for bamlss.frame
terms(x, specials = NULL, data = NULL,
model = NULL, pterms = TRUE, sterms = TRUE,
drop = TRUE, ...)
# S3 method for bamlss.formula
terms(x, specials = NULL, data = NULL,
model = NULL, pterms = TRUE, sterms = TRUE,
drop = TRUE, ...)
An link{bamlss}
, bamlss.frame
or
bamlss.formula
object.
See terms.object
.
Data passed to terms.formula
.
Character or integer, specifies the model for which terms should be returned.
Should parametric terms be part of the object?
Should smooth terms be part of the object?
If terms for only one model
are returned, the list structure is dropped.
Arguments passed to bamlss.formula
.
Object of class "bamlss.terms"
, a list of terms.object
s, depending on
the structure of the bamlss.formula
object.
## Model formula.
f <- list(
num ~ x1 + x2 + id,
sigma ~ x3 + fac + lon + lat
)
## Create the terms object.
terms(bamlss.formula(f))
#> $num
#> num ~ x1 + x2 + id
#> attr(,"variables")
#> list(num, x1, x2, id)
#> attr(,"factors")
#> x1 x2 id
#> num 0 0 0
#> x1 1 0 0
#> x2 0 1 0
#> id 0 0 1
#> attr(,"term.labels")
#> [1] "x1" "x2" "id"
#> attr(,"specials")
#> attr(,"specials")$s
#> NULL
#>
#> attr(,"specials")$te
#> NULL
#>
#> attr(,"specials")$t2
#> NULL
#>
#> attr(,"specials")$sx
#> NULL
#>
#> attr(,"specials")$s2
#> NULL
#>
#> attr(,"specials")$rs
#> NULL
#>
#> attr(,"specials")$ti
#> NULL
#>
#> attr(,"specials")$tx
#> NULL
#>
#> attr(,"specials")$tx2
#> NULL
#>
#> attr(,"specials")$tx3
#> NULL
#>
#> attr(,"specials")$tx4
#> NULL
#>
#> attr(,"specials")$la
#> NULL
#>
#> attr(,"specials")$n
#> NULL
#>
#> attr(,"specials")$h
#> NULL
#>
#> attr(,"specials")$lf
#> NULL
#>
#> attr(,"specials")$af
#> NULL
#>
#> attr(,"specials")$lf.vd
#> NULL
#>
#> attr(,"specials")$re
#> NULL
#>
#> attr(,"specials")$peer
#> NULL
#>
#> attr(,"specials")$fpc
#> NULL
#>
#> attr(,"specials")$lin
#> NULL
#>
#> attr(,"specials")$rb
#> NULL
#>
#> attr(,"specials")$tree
#> NULL
#>
#> attr(,"order")
#> [1] 1 1 1
#> attr(,"intercept")
#> [1] 1
#> attr(,"response")
#> [1] 1
#> NULL
#>
#> $sigma
#> sigma ~ x3 + fac + lon + lat
#> attr(,"variables")
#> list(sigma, x3, fac, lon, lat)
#> attr(,"factors")
#> x3 fac lon lat
#> sigma 0 0 0 0
#> x3 1 0 0 0
#> fac 0 1 0 0
#> lon 0 0 1 0
#> lat 0 0 0 1
#> attr(,"term.labels")
#> [1] "x3" "fac" "lon" "lat"
#> attr(,"specials")
#> attr(,"specials")$s
#> NULL
#>
#> attr(,"specials")$te
#> NULL
#>
#> attr(,"specials")$t2
#> NULL
#>
#> attr(,"specials")$sx
#> NULL
#>
#> attr(,"specials")$s2
#> NULL
#>
#> attr(,"specials")$rs
#> NULL
#>
#> attr(,"specials")$ti
#> NULL
#>
#> attr(,"specials")$tx
#> NULL
#>
#> attr(,"specials")$tx2
#> NULL
#>
#> attr(,"specials")$tx3
#> NULL
#>
#> attr(,"specials")$tx4
#> NULL
#>
#> attr(,"specials")$la
#> NULL
#>
#> attr(,"specials")$n
#> NULL
#>
#> attr(,"specials")$h
#> NULL
#>
#> attr(,"specials")$lf
#> NULL
#>
#> attr(,"specials")$af
#> NULL
#>
#> attr(,"specials")$lf.vd
#> NULL
#>
#> attr(,"specials")$re
#> NULL
#>
#> attr(,"specials")$peer
#> NULL
#>
#> attr(,"specials")$fpc
#> NULL
#>
#> attr(,"specials")$lin
#> NULL
#>
#> attr(,"specials")$rb
#> NULL
#>
#> attr(,"specials")$tree
#> NULL
#>
#> attr(,"order")
#> [1] 1 1 1 1
#> attr(,"intercept")
#> [1] 1
#> attr(,"response")
#> [1] 1
#> NULL
#>
#> attr(,"class")
#> [1] "bamlss.terms" "list"
#> attr(,".Environment")
#> <environment: 0x59b332c3c9c0>