argnames.Rd
Functions to get and set “argument names” for
functions that take vectorised arguments. For example, the likelihood
function returned by make.bisse
takes a vector of six these
functions can be used to get the canonical names for these six
parameters, and also to set them to something more memorable. These
names are used by the constrain
function to specify
submodels.
argnames(x, ...)
argnames(x) <- value
# S3 method for class 'constrained'
argnames(x, ...)
# S3 method for class 'constrained'
argnames(x) <- value
Methods exist for all models: bisse
, geosse
, bd
,
yule
, mk2
, and mkn
. These are particulary useful
for mkn
as the number of parameters for the Q matrix can be
very large.
## Same example likelihood function as for \link{make.bisse}:
pars <- c(0.1, 0.2, 0.03, 0.03, 0.01, 0.01)
set.seed(4)
phy <- tree.bisse(pars, max.t=30, x0=0)
f <- make.bisse(phy, phy$tip.state)
argnames(f) # Canonical argument names (set by default)
#> [1] "lambda0" "lambda1" "mu0" "mu1" "q01" "q10"
## Names that might be more informative for a tall/short state
argnames(f) <- c("l.tall", "l.short", "m.tall", "m.short",
"q.tall.short", "q.short.tall")
argnames(f)
#> [1] "l.tall" "l.short" "m.tall" "m.short" "q.tall.short"
#> [6] "q.short.tall"