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, ind, family = gaussian, method = c("lqa", "nlm"),
tuning = list(lambda=TRUE, phi=0.5), weights,
control = cat_control(), plot=FALSE, ...)
abc(X, y, ind, 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 penalty parameter used; phi weights the penalty's terms, out of intervall )0,1(, the default 0.5 corresponds to equal weights; if lambda cat_control(); see cat_controlgvcm.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 indexgvcm.cat returns an object of class "gvcm.cat"glmlmgvcm.catcoefficients.reducedmethod="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.fitfamily object useddeviance; the null model includes a non-varying intercept onlyrankcontrol argument usedmethodmodel.frame on the special handling of NAs; currently always na.omitplot=TRUE, a list containig two matrixes for plottinglambda and phi; if lambda and/or phi were cross-validated, these are the optimal valuesindexindexindexx 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.
A varying intercept is denoted by v(1,u) and has stand at the formula's very beginning. 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).
For binomial and quasibinomial 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