pamm | R Documentation |
A thin wrapper around gam
, however, some arguments are
prespecified:
family=poisson()
and offset=data$offset
.
These two can not be overwritten. In many cases it will also be advisable to
set method="REML"
.
pamm(formula, data = list(), ..., trafo_args = NULL, engine = "gam")
is.pamm(x)
## S3 method for class 'pamm'
print(x, ...)
## S3 method for class 'pamm'
summary(object, ...)
## S3 method for class 'pamm'
plot(x, ...)
formula |
A GAM formula, or a list of formulae (see |
data |
A data frame or list containing the model response variable and
covariates required by the formula. By default the variables are taken
from |
... |
Further arguments passed to |
trafo_args |
A named list. If data is not in PED format, |
engine |
Character name of the function that will be called to fit the
model. The intended entries are either |
x |
Any R object. |
object |
An object of class |
gam
ped <- tumor[1:100, ] %>%
as_ped(Surv(days, status) ~ complications, cut = seq(0, 3000, by = 50))
pam <- pamm(ped_status ~ s(tend) + complications, data = ped)
summary(pam)
## Alternatively
pamm(
ped_status ~ s(tend) + complications,
data = tumor[1:100, ],
trafo_args = list(formula = Surv(days, status)~complications))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.