Generic Methods for S3 class cauphyfit
.
# S3 method for class 'cauphyfit'
print(x, digits = max(3, getOption("digits") - 3), ...)
# S3 method for class 'cauphyfit'
vcov(object, ...)
# S3 method for class 'cauphyfit'
logLik(object, ...)
# S3 method for class 'logLik.cauphyfit'
AIC(object, k = 2, ...)
# S3 method for class 'cauphyfit'
AIC(object, k = 2, ...)
# S3 method for class 'cauphyfit'
confint(object, parm, level = 0.95, ...)
# S3 method for class 'cauphyfit'
coef(object, ...)
an object of class "phylolm"
.
number of digits to show in summary method.
further arguments to methods.
an object of class cauphyfit
.
numeric, the penalty per parameter to be used; the default k = 2
is the classical AIC.
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.
the confidence level required.
Same value as the associated methods from the stats
package:
# Simulate tree and data
set.seed(1289)
phy <- ape::rphylo(20, 0.1, 0)
dat <- rTraitCauchy(n = 1, phy = phy, model = "cauchy",
parameters = list(root.value = 10, disp = 0.1))
# Fit the data
fit <- fitCauchy(phy, dat, model = "cauchy", method = "reml")
fit
#> Call:
#> fitCauchy(phy = phy, trait = dat, model = "cauchy", method = "reml")
#>
#> AIC logLik (restricted)
#> 74.06 -36.03
#>
#> Parameter estimate(s) using REML:
#> dispersion: 0.06255127
# vcov matrix
vcov(fit)
#> disp
#> disp 0.0003866757
# Approximate confidence intervals
confint(fit)
#> Approximated asymptotic confidence interval using the Hessian.
#> 2.5 % 97.5 %
#> disp 0.0240104 0.1010921
# log likelihood of the fitted object
logLik(fit)
#> 'log Lik.' -36.02821 (df=1)
# AIC of the fitted object
AIC(fit)
#> [1] 74.05642
# coefficients
coef(fit)
#> disp
#> 0.06255127