Methods of the "hansentree" class.
# S4 method for hansentree
logLik(object)
# S4 method for hansentree
coef(object, …)
# S4 method for hansentree
summary(object, …)
# S4 method for hansentree
show(object)
# S4 method for hansentree
print(x, …)
# S4 method for hansentree
plot(x, y, regimes, …)
# S4 method for hansentree
simulate(object, nsim = 1, seed = NULL, …)
# S4 method for hansentree
update(object, data, regimes, sqrt.alpha, sigma, …)
# S4 method for hansentree
bootstrap(object, nboot = 200, seed = NULL, …)
# S4 method for hansentree
as(object, class)
# S4 method for hansentree,data.frame
coerce(from, to = "data.frame", strict = TRUE)
The hansentree
object.
the hansentree
object.
character;
name of the class to which object
should be coerced.
the classes betwen which coercion should be performed.
The number of simulations to perform.
The number of boostraps to perform.
The random seed to use in simulations.
See hansen
.
see hansen
.
Ignored.
Further arguments (either ignored or passed to underlying functions).
In the case of update
, these replace the corresponding arguments in the original call.
plot()
plots the tree, with branches colored according to the selective regimes. See plot-ouchtree for more details.
print()
prints the tree as a table, along with the coefficients of the fitted model and diagnostic information.
show()
displays the fitted hansentree
object.
summary()
displays information on the call, the fitted coefficients, and model selection statistics.
A hansentree
object can be coerced to a data-frame via as(object,"data.frame")
.
coef()
extracts the coefficients of the fitted model. This is a list with five elements:
sqrt.alpha
:the coefficients that parameterize the alpha matrix.
sigma
:the coefficients that parameterize the sigma matrix.
theta
:a list of the estimated optima, one per character. Each element of the list is a vector containing one optimal value per regime.
alpha.matrix
:the alpha matrix itself.
sigma.sq.matrix
:the sigma-squared matrix itself.
logLik()
extracts the log likelihood of the fitted model.
update()
refines the model fit.
bootstrap()
performs a parametric bootstrap for confidence intervals.
simulate()
generates random deviates from the fitted model.
object
is the hansentree
object, nsim
is the desired number of replicates, and seed
is (optionally) the random seed to use.
simulate
returns a list of data-frames, each comparable to the original data.