vcov.cauphylm function

Generic Methods for S3 class cauphylm.

Generic Methods for S3 class cauphylm.

## 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, se.fit = FALSE, ...) ## S3 method for class 'cauphylm' confint(object, parm, level = 0.95, ...) ## S3 method for class 'cauphylm' coef(object, ...)

Arguments

  • x: an object of class "phylolm".
  • digits: number of digits to show in summary method.
  • ...: further arguments to methods.
  • object: an object of class cauphylm.
  • k: numeric, the penalty per parameter to be used; the default k = 2 is the classical AIC.
  • 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.
  • se.fit: A switch indicating if standard errors are required.
  • 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.

Returns

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.

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)

See Also

cauphylm, vcov, logLik

AIC, confint, coef, predict, predict.phylolm

  • Maintainer: Paul Bastide
  • License: GPL (>= 3)
  • Last published: 2024-10-01