print.cauphylm {cauphy} | R Documentation |
Generic Methods for S3 class cauphylm
.
Description
Generic Methods for S3 class cauphylm
.
Usage
## S3 method for class 'cauphylm'
print(x, digits = max(3, getOption("digits") - 3), ...)
## S3 method for class 'cauphylm'
vcov(object, ...)
## S3 method for class 'cauphylm'
logLik(object, ...)
## S3 method for class 'logLik.cauphylm'
AIC(object, k = 2, ...)
## S3 method for class 'cauphylm'
AIC(object, k = 2, ...)
## S3 method for class 'cauphylm'
predict(object, newdata = NULL, ...)
## S3 method for class 'cauphylm'
confint(object, parm, level = 0.95, ...)
## S3 method for class 'cauphylm'
coef(object, ...)
Arguments
x |
an object of class |
digits |
number of digits to show in summary method. |
... |
further arguments to methods. |
object |
an object of class |
k |
numeric, the penalty per parameter to be used; the default |
newdata |
an optional data frame to provide the predictor values at which predictions should be made. If omitted, the fitted values are used. Currently, predictions are made for new species whose placement in the tree is unknown. Only their covariate information is used. The prediction for the trend model is not currently implemented. |
parm |
a specification of which parameters are to be given confidence intervals, either a vector of numbers or a vector of names. If missing, all parameters are considered. |
level |
the confidence level required. |
Value
Same value as the associated methods from the stats
package:
vcov
an estimated covariance matrix, see
compute_vcov
;logLik
an object of class
logLik
;AIC
a numeric value;
confint
a matrix (or vector) with columns giving lower and upper confidence limits for each parameter;
coef
coefficients extracted from the model;
predict
a vector of predicted values.
See Also
cauphylm
, vcov
, logLik
AIC
, confint
, coef
,
predict
, predict.phylolm
Examples
# Simulate tree and data
set.seed(1289)
phy <- ape::rphylo(20, 0.1, 0)
error <- rTraitCauchy(n = 1, phy = phy, model = "cauchy",
parameters = list(root.value = 0, disp = 0.1))
x1 <- ape::rTraitCont(phy, model = "BM", sigma = 0.1, root.value = 0)
trait <- 3 + 2*x1 + error
# Fit the data
fit <- cauphylm(trait ~ x1, phy = phy)
fit
# vcov matrix
vcov(fit)
# Approximate confidence intervals
confint(fit)
# log likelihood of the fitted object
logLik(fit)
# AIC of the fitted object
AIC(fit)
# predicted values
predict(fit)
# coefficients
coef(fit)