Description Usage Arguments Details Author(s) See Also Examples
Standard methods for computing on tvcm
objects.
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  ## S3 method for class 'tvcm'
coef(object, ...)
## S3 method for class 'tvcm'
depth(x, root = FALSE, ...)
## S3 method for class 'tvcm'
extract(object, what = c(
"control", "model",
"nodes", "sctest", "p.value",
"devgrid", "cv", "selected",
"coef", "sd", "var"),
steps = NULL, ...)
## S3 method for class 'tvcm'
neglogLik2(object, ...)
## S3 method for class 'tvcm'
predict(object, newdata = NULL,
type = c("link", "response", "prob", "class",
"node", "coef", "ranef"),
ranef = FALSE, na.action = na.pass, ...)
## S3 method for class 'tvcm'
splitpath(tree, steps = 1L,
details = FALSE, ...)
## S3 method for class 'tvcm'
summary(object, ...)
## S3 method for class 'tvcm'
width(x, ...)

object, tree, x 
an object of class 
root 
logical scalar. Should the root count be counted in

steps 
integer vector. The iteration steps from which information should be extracted. 
newdata 
an optional data frame in which to look for variables with which to predict, if omitted, the fitted values are used. 
type 
character string. Denotes for 
na.action 
function determining what should be done with missing
values for fixed effects in 
ranef 
logical scalar or matrix indicating whether prediction
should be based on random effects. See

what 
a character specifying the quantities to 
details 
logical scalar. Whether detail results like coefficient constancy tests or loss minimizing grid search should be shown. 
... 
Additional arguments passed to the calls. 
The predict
function has two additional options for the
type
argument. The option "node"
calls the node id and
"coef"
predicts the coefficients corresponding to an
observation. In cases of multiple vc
terms for the same
predictor, the coefficients are summed up.
The splitpath
function allows to backtrack the
partitioning procedure. By default, it shows which split was chosen in
the first iteration. The interesting iteration(s) can be selected by
the steps
argument. With details = TRUE
it is also
possible to backtrack the coefficient constancy tests and/or the loss
reduction statistics.
summary
computes summary statistics of the fitted model,
including the estimated coefficients. The varying coefficient are printed
by means of a printed decision tree. Notice that in cases there is no split
for the varying coefficient, the average coefficient will be among the
fixed effects.
Further undocumented, available methods are: fitted
,
formula
, getCall
,
logLik
, model.frame
,
nobs
, print
, ranef
,
resid
, and weights
. All these
methods have the same arguments as the corresponding default methods.
Reto Buergin
tvcm
, tvcmassessment
,
tvcmplot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  ##  #
## Dummy example:
##
## Apply various methods on a 'tvcm' object fitted on the 'vcrpart_2'
## data. Crossvalidation is omitted to accelerate the computations.
##  #
data(vcrpart_2)
model < tvcm(y ~ 1 + vc(z1, z2) + vc(z1, z2, by = x1) + x2,
data = vcrpart_2, family = gaussian(), subset = 1:90,
control = tvcm_control(cv = FALSE))
coef(model)
extract(model, "selected")
extract(model, "model")
predict(model, newdata = vcrpart_2[91:100,], type = "node")
predict(model, newdata = vcrpart_2[91:100,], type = "response")
splitpath(model, steps = 1)
summary(model, digits = 2)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.