Description Usage Arguments Value References See Also
A mixed Gaussian phylogenetic model (MGPM) represents a
Gaussian phylogenetic model with shifts in the underlying parameters and,
optionally, type of Gaussian stochastic process (e.g. shifts from a BM to an
OU model of evolution). The function PCMFitMixed
implements a
recursive clade partition (RCP) search for an approximate information score
optimization. A deteailed description of the algorithm is provided in
Appendix A in Mitov et al. 2019a. For this documentation, it is important to
note that the algorithm proceeds in three steps as follows:
Model type fits to all clades in the tree bigger than a specified
(see argument minCladeSize
).
Recursive clade partition search.
Round-robin search for an optimal model type mapping in the best partitions found during the RCP-step. This step is optional.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | PCMFitMixed(
X,
tree,
modelTypes = MGPMDefaultModelTypes(),
subModels = c(B = "A", C = "A", D = "B", E = "D", F = "E"),
argsMixedGaussian = Args_MixedGaussian_MGPMDefaultModelTypes(),
SE = matrix(0, nrow(X), PCMTreeNumTips(tree)),
generatePCMModelsFun = PCMGenerateModelTypes,
metaIFun = PCMInfo,
positiveValueGuard = Inf,
scoreFun = AIC,
fitMappingsPrev = NULL,
tableFitsPrev = fitMappingsPrev$tableFits,
modelTypesInTableFitsPrev = NULL,
listPartitions = NULL,
minCladeSizes = 20L,
skipNodes = character(),
maxCladePartitionLevel = if (is.null(listPartitions)) 8L else 1L,
maxNumNodesPerCladePartition = 1L,
listAllowedModelTypesIndices = c("best-clade-2", "best-clade", "all"),
argsConfigOptim1 = DefaultArgsConfigOptim(numCallsOptim = 10),
argsConfigOptim2 = DefaultArgsConfigOptim(numCallsOptim = 4),
argsConfigOptim3 = DefaultArgsConfigOptim(numCallsOptim = 10),
maxNumRoundRobins = 0,
maxNumPartitionsInRoundRobins = 2,
listPCMOptions = PCMOptions(),
skipFitWhenFoundInTableFits = TRUE,
doParallel = FALSE,
prefixFiles = "fits_",
saveTempWorkerResults = TRUE,
printFitVectorsToConsole = FALSE,
verbose = TRUE,
debug = FALSE
)
|
X |
a |
tree |
a phylo object with N tips. |
modelTypes |
a named character string vector. Each such
string denotes a MGPM model class. The default setting is
See also the argument |
subModels |
a named character string vector with names and elements
among the names of |
argsMixedGaussian |
a list of arguments passed to
|
SE |
a k x N matrix specifying the standard error for each measurement in
X. Alternatively, a k x k x N cube specifying an upper triangular k x k
factor of the variance covariance matrix for the measurement error
for each tip
Note that the above behavior is consistent with the treatment of the model
parameters |
generatePCMModelsFun |
A function generating PCM model types.
Specifying this function is only needed if the inference is to be done using #' custom candidate model types. Default setting:
|
metaIFun |
a metaI function needed to generate meta- and cache- objects
for the model objects generated during the RCP search. By default this is
set to |
positiveValueGuard |
a real number (not necessarily positive) used during
the fit as a threshold for highly positive but likely incorrect log-likelihood
values. This argument is set to |
scoreFun |
a information score function such as AIC or BIC.
Default: |
fitMappingsPrev |
an object of S3 class PCMFitModelMappings, returned
during a previous call to |
tableFitsPrev |
a |
modelTypesInTableFitsPrev |
model types used for the fits in
|
listPartitions, minCladeSizes, skipNodes |
arguments controlling the
search for an optimal shift point configuration. If not |
maxCladePartitionLevel |
An integer limiting the number of recursive
levels of the RCP search algorithm. Default setting:
|
maxNumNodesPerCladePartition |
An integer controlling the number of
partition nodes in subtree-partitions during the RCP search. By default,
this is set to |
listAllowedModelTypesIndices |
Default setting: |
argsConfigOptim1, argsConfigOptim2, argsConfigOptim3 |
Arguments
controlling the calls to |
maxNumRoundRobins |
number of round-robin iterations. By default this is set ot 0, i.e. no round-robin step is performed. |
maxNumPartitionsInRoundRobins |
maximum number (2 by default) of top
partitions tobe included in the round-robin step. This argument only has an
impact if |
listPCMOptions |
a list of PCM runtime options to be specified prior
to running the fit. By default, this is set to |
skipFitWhenFoundInTableFits |
logical. Default: |
doParallel |
logical indicating if the recursive clade partition search
should be executed in parallel. Default: |
prefixFiles |
a character string used to name a 'Current_X.RData' file
stored during the inference, where X is to be replaced by the value of
|
saveTempWorkerResults, printFitVectorsToConsole, debug |
Debugging options controlling log-messages and storing of temporary results.
These are mostly for internal use. Default setting:
|
verbose |
logical indicating if information messages should be printed
to the console while running. Default: |
an object of S3 class PCMFitModelMappings.
[Mitov et al. 2019a] Mitov, V., Bartoszek, K., & Stadler, T. (2019). Automatic generation of evolutionary hypotheses using mixed Gaussian phylogenetic models. Proceedings of the National Academy of Sciences of the United States of America, 35, 201813823. http://doi.org/10.1073/pnas.1813823116
[Mitov et al. 2019b] Mitov, V., Bartoszek, K., Asimomitis, G., & Stadler, T. (2019). Fast likelihood calculation for multivariate Gaussian phylogenetic models with shifts. Theoretical Population Biology. http://doi.org/10.1016/j.tpb.2019.11.005
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.