gvcm.cat(formula, data, family = gaussian, method = "lqa",
tuning = list(lambda=TRUE, phi=0.5), weights, control,
model = FALSE, x = FALSE, y = FALSE, plot=FALSE, ...)
## S3 method for class 'default':
gvcm.cat(formula, data, family = gaussian, method = "lqa",
tuning = list(lambda=TRUE, phi=0.5), weights, control,
model = FALSE, x = FALSE, y = FALSE, plot=FALSE, ...)
pest(X, y, indices, family = gaussian, method = c("lqa","nlm"),
tuning = list(lambda=TRUE, phi=0.5), weights,
control = cat_control(), plot=FALSE, ...)
abc(X, y, indices, family = gaussian, method = c("AIC", "BIC"),
weights, control = cat_control(), plot=FALSE, ...)
formula
: a symbolic description of the model to be fitted. See detailsfamily
object describing the error distribution and link function to be used in the model; this can be a character string naming a family function, a family function or the result of a call to a family function, see
"lqa"
, "nlm"
, "AIC"
or "BIC"
; methods "lqa"
and "nlm"
induce penalized estimation; the default method "lqa"
employs a PIRLSlambda
is the overall penalty parameter; phi
weights the penalty terms of varying coefficients, it must be out of intervall )0,1(, the default 0.5
corresponds to eqcat_control()
; see cat_control
gvcm.cat
: logical values indicating whether the response vector and model matrix used in the fitting process shall be returned or not; for pest
and abc
: y
must be a response vectorpest
and abc
: a proper coded design matrixpest
and abc
only: the to be used index arguments; see function index
gvcm.cat
returns an object of class "gvcm.cat"
glm
lm
gvcm.cat
coefficients.reduced
method="lqa"
estimated by the trace of the generalized head matrix; for method="nlm"
the estimate is the number of selected coefficients; for methods "AIC"
, "BIC"
estimated like default in glm.fit
family
object useddeviance
; the null model includes a non-varying intercept onlyrank
control
argument usedmethod
model.frame
on the special handling of NA
s; currently always na.omit
plot=TRUE
, a list containig two matrixes for plottinglambda
and phi
; if lambda
and/or phi
were cross-validated, these are the optimal valuesindex
x
into its reduced version; e.g. needed for refittingformula
suppliedterms
object usedformula
has the form response ~ 1 + terms
; where response
is the response vector and terms
is a series of terms which specifies a linear predictor.
Varying coefficients enter the formula
as v(x,u)
where u
denotes the categorial effect modifier and x
the modfied covariate. For methods "lqa"
and "nlm"
, these coefficients are penalized as described in Oelker et. al. 2012 (for weighting see phi
in argument tuning
); for methods "AIC"
and "BIC"
, they are selected by a forward selection method as described in Oelker et. al. 2012.
A varying intercept is denoted by v(1,u)
. If the formula
contains no (varying) intercept, gvcm.cat
assumes a constant intercept.
There is no way to avoid an intercept.
Ordinal/nominal covariates u
given as p(u)
are penalized as described in Gertheiss and Tutz (2010) or selected by the same forward selection strategy as v(x,u)
.
For numeric covariates, p(u)
indicates a pure Lasso penalty.
For binomial families the response can also be a success/failure rate or a two-column matrix with the columns giving the numbers of successes and failures.
Function pest
computes penalized estimates, that is, it implements methods "lqa"
(PIRLS-algorithm) and "nlm"
.
Function abc
implements the forward selection strategy employing AIC/BIC.
Categorial effect modifiers and penalized categorial covariates are dummy coded as required by the penalty. If x
in v(x,u)
is binary, it is effect coded (first category refers to -1). Other covariates are coded like given by getOption
.index
, cat_control
, plot.gvcm.cat
, predict.gvcm.cat
, simulation
## continues example of function simulation
f <- y ~ v(1,u) + v(x1,u) + v(x2,u)
m1 <- gvcm.cat(f, data, binomial(), plot=TRUE)
summary(m1)
Run the code above in your browser using DataLab