Package: secsse 3.7.0

secsse: Several Examined and Concealed States-Dependent Speciation and Extinction

Simultaneously infers state-dependent diversification across two or more states of a single or multiple traits while accounting for the role of a possible concealed trait. See Herrera-Alsina et al. (2019) <doi:10.1093/sysbio/syy057>.

Authors:Leonel Herrera Alsina [aut], Paul van Els [aut], Thijs Janzen [ctb], Hanno Hildenbrandt [ctb], Pedro Santos Neves [ctb], Rampal S. Etienne [cre, aut]

secsse_3.7.0.tar.gz
secsse_3.7.0.zip(r-4.7)secsse_3.7.0.zip(r-4.6)secsse_3.7.0.zip(r-4.5)
secsse_3.7.0.tgz(r-4.6-x86_64)secsse_3.7.0.tgz(r-4.6-arm64)secsse_3.7.0.tgz(r-4.5-x86_64)secsse_3.7.0.tgz(r-4.5-arm64)
secsse_3.7.0.tar.gz(r-4.7-arm64)secsse_3.7.0.tar.gz(r-4.7-x86_64)secsse_3.7.0.tar.gz(r-4.6-arm64)secsse_3.7.0.tar.gz(r-4.6-x86_64)
secsse_3.7.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
secsse/json (API)

# Install 'secsse' in R:
install.packages('secsse', repos = c('https://rsetienne.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/rsetienne/secsse/issues

Pkgdown/docs site:https://rsetienne.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

Conda:

cpp

6.47 score 1 stars 37 scripts 668 downloads 26 exports 71 dependencies

Last updated from:925a70cf59. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK204
linux-devel-x86_64OK206
source / vignettesOK304
linux-release-arm64OK200
linux-release-x86_64OK215
macos-release-arm64OK139
macos-release-x86_64OK300
macos-oldrel-arm64OK129
macos-oldrel-x86_64OK237
windows-develOK187
windows-releaseOK225
windows-oldrelOK230
wasm-releaseOK178

Exports:cla_id_paramPoscla_secsse_loglikcla_secsse_mlcla_secsse_ml_func_def_parscreate_default_lambda_transition_matrixcreate_default_shift_matrixcreate_lambda_listcreate_mu_vectorcreate_q_matrixdefault_params_docevent_timesexpand_q_matrixextract_par_valsfill_inid_paramPosplot_idparslistplot_state_exactprepare_full_lambdasq_doubletranssecsse_logliksecsse_loglik_evalsecsse_mlsecsse_ml_func_def_parssecsse_simsecsse_single_branch_logliksortingtraits

Dependencies:apeBHcachemcliclusterGenerationcodacodetoolscolorspacecombinatcpp11DDDDEoptimdeSolvedigestdoParallelexpmfarverfastmapfastmatchforeachgeigergenericsggplot2gluegmpgtableigraphisobanditeratorslabelinglatticelifecyclemagrittrmapsMASSMatrixmemoisemnormtmvtnormncbitnlmenloptrnumDerivoptimParallelphangornphytoolspillarpkgconfigpracmapsoquadprogR6RColorBrewerRcppRcppArmadilloRcppEigenRcppParallelrlangRSpectraS7scalesscatterplot3dSparseMsubplextibbletreebalancetreestatsutf8vctrsviridisLitewithr

Plotting probabilities
Plotting ancestral states | Using CLA secsse

Last update: 2026-05-15
Started: 2023-04-26

Using secsse with complete phylogenies (with extinction)
Introduction | Set-up | Fitting the model | Comparing with reconstructed trees | References

Last update: 2026-05-15
Started: 2023-07-27

Starting secsse
Secsse introduction | Secsse input files | Note on assigning ambiguity to taxon trait states | Setting up an analysis | ETD | Lambda matrices | Mu vector | Transition matrix | Maximum Likelihood | CTD | CR | Model comparisong using AIC | Further help | References

Last update: 2026-05-04
Started: 2023-07-27

Simulating with secsse
Prep work | Creating parameter structure | Simulating | Conditioning

Last update: 2023-07-27
Started: 2023-07-27

Readme and manuals

Help Manual

Help pageTopics
Parameter structure setting for cla_secsse It sets the parameters (speciation, extinction and transition) IDs. Needed for ML calculation with cladogenetic options (cla_secsse_ml)cla_id_paramPos
Likelihood for SecSSE model, using Rcpp Loglikelihood calculation for the cla_SecSSE model given a set of parameters and data using Rcppcla_secsse_loglik
Maximum likehood estimation for (SecSSE)cla_secsse_ml
Maximum likehood estimation for (SecSSE) with parameter as complex functions. Cladogenetic versioncla_secsse_ml_func_def_pars
Helper function to create a default lambda listcreate_default_lambda_transition_matrix
Helper function to create a default 'shift_matrix' listcreate_default_shift_matrix
Helper function to automatically create lambda matrices, based on input. When choosing the CTD model, rates associated with observed states are now re-distributed to concealed states. This implicitly assumes that the number of observed and concealed states is identical.create_lambda_list
Generate mus vectorcreate_mu_vector
Helper function to neatly setup a Q matrix, without transitions to concealed states (only observed transitions shown)create_q_matrix
Event times of a (possibly non-ultrametric) phylogenetic treeevent_times
A phylogeny with traits at the tipsexample_phy_GeoSSE
Function to expand an existing q_matrix to a number of concealed statesexpand_q_matrix
Extract parameter values out of the result of a maximum likelihood inference runextract_par_vals
Helper function to enter parameter value on their right placefill_in
Parameter structure setting Sets the parameters (speciation, extinction and transition) ids. Needed for ML calculation ('secsse_ml()').id_paramPos
A phylogenetic reconstuction to run the vignettephylo_vignette
function to visualize the structure of the idparslistplot_idparslist
Plot the local probability along a treeplot_state_exact
Prepares the entire set of lambda matrices for cla_secsse. It provides the set of matrices containing all the speciation ratesprepare_full_lambdas
Basic Qmatrix Sets a Q matrix where double transitions are not allowedq_doubletrans
Likelihood for SecSSE model Loglikelihood calculation for the SecSSE model given a set of parameters and datasecsse_loglik
Likelihood for SecSSE model Logikelihood calculation for the SecSSE model given a set of parameters and data, returning also the likelihoods along the branchessecsse_loglik_eval
Maximum likehood estimation for (SecSSE)secsse_ml
Maximum likehood estimation for (SecSSE) complex functions as parametersecsse_ml_func_def_pars
Function to simulate a tree, conditional on observing all states.secsse_sim
Likelihood for SecSSE model Loglikelihood calculation for the SecSSE model given a set of parameters and data, calculated for a single branchsecsse_single_branch_loglik
Data checking and trait sorting In preparation for likelihood calculation, it orders trait data according the tree tipssortingtraits
A table with trait info to run the vignettetraits