Package: DGM 1.7.4

Simon Schwab

DGM: Dynamic Graphical Models

Dynamic graphical models for multivariate time series data to estimate directed dynamic networks in functional magnetic resonance imaging (fMRI), see Schwab et al. (2017) <doi:10.1016/j.neuroimage.2018.03.074>.

Authors:Simon Schwab <[email protected]>, Ruth Harbord <[email protected]>, Lilia Costa <[email protected]>, Thomas Nichols <[email protected]>

DGM_1.7.4.tar.gz
DGM_1.7.4.tar.gz(r-4.5-noble)DGM_1.7.4.tar.gz(r-4.4-noble)
DGM_1.7.4.tgz(r-4.4-emscripten)DGM_1.7.4.tgz(r-4.3-emscripten)
DGM.pdf |DGM.html
DGM/json (API)

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

Peer review:

Bug tracker:https://github.com/schw4b/dgm/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:
  • myts - Network simulation data.
  • utestdata - Results from v.1.0 for unit tests.

3.10 score 25 scripts 261 downloads 12 mentions 38 exports 46 dependencies

Last updated 3 years agofrom:bcbe98a3d0. Checks:OK: 1 NOTE: 1. Indexed: no.

TargetResultDate
Doc / VignettesOKOct 07 2024
R-4.5-linux-x86_64NOTEOct 07 2024

Exports:binom.nettestcentercor2adjcorTsdgm.groupdiag.deltadlm.lpldlm.retrodlmLplCppexhaustive.searchgetAdjacencygetIncompleteNodesgetModelgetModelNrgetWinnergplotMatmergeModelsmodel.generatornodepatelpatel.groupperfpriors.specprop.nettestpruningrand.testread.subjectreshapeTsrmdiagrmnarmRecipLowscaleTsstepwise.backwardstepwise.combinestepwise.forwardsubjectsymmetricttest.nettest

Dependencies:clicodetoolscoincolorspacedata.tablefansifarverggplot2gluegtableisobandlabelinglatticelibcoinlifecyclemagrittrMASSMatrixmatrixStatsmgcvmodeltoolsmultcompmunsellmvtnormnlmepillarpkgconfigplyrR6RColorBrewerRcppRcppArmadilloreshape2rlangsandwichscalesstringistringrsurvivalTH.datatibbleutf8vctrsviridisLitewithrzoo

Readme and manuals

Help Manual

Help pageTopics
Performes a binomial test with FDR correction for network edge occurrence.binom.nettest
Mean centers timeseries in a 2D array timeseries x nodes, i.e. each timeseries of each node has mean of zero.center
Threshold correlation matrix to match a given number of edges.cor2adj
Mean correlation of time series across subjects.corTs
A group is a list containing restructured data from subejcts for easier group analysis.dgm.group
Quick diagnostics on delta.diag.delta
Calculate the log predictive likelihood for a specified set of parents and a fixed delta.dlm.lpl
Calculate the location and scale parameters for the time-varying coefficients given all the observations. West, M. & Harrison, J., 1997. Bayesian Forecasting and Dynamic Models. Springer New York.dlm.retro
C++ implementation of the dlm.lpldlmLplCpp
A function for an exhaustive search, calculates the optimum value of the discount factor.exhaustive.search
Get adjacency and associated likelihoods (LPL) and disount factros (df) of winning models.getAdjacency
Checks results and returns job number for incomplete nodes.getIncompleteNodes
Extract specific parent model with assocated df and ME from complete model space.getModel
Get model number from a set of parents.getModelNr
Get winner network by maximazing log predictive likelihood (LPL) from a set of models.getWinner
Plots network as adjacency matrix.gplotMat
Merges forward and backward model store.mergeModels
A function to generate all the possible models.model.generator
Network simulation data.myts
Runs exhaustive search on a single node and saves results in txt file.node
Patel.patel
A group is a list containing restructured data from subejcts for easier group analysis.patel.group
Performance of estimates, such as sensitivity, specificity, and more.perf
Specify the priors. Without inputs, defaults will be used.priors.spec
Comparing two population proportions on the network with FDR correction.prop.nettest
Get pruned adjacency network.pruning
Randomization test for Patel's kappa. Creates a distribution of values kappa under the null hypothesis.rand.test
Reads single subject's network from txt files.read.subject
Reshapes a 2D concatenated time series into 3D according to no. of subjects and volumes.reshapeTs
Removes diagonal of NA's from matrix.rmdiag
Removes NAs from matrix.rmna
Removes reciprocal connections in the lower diagnoal of the network matrix.rmRecipLow
Scaling data. Zero centers and scales the nodes (SD=1).scaleTs
Stepise backward non-exhaustive greedy search, calculates the optimum value of the discount factor.stepwise.backward
Stepise combinestepwise.combine
Stepise forward non-exhaustive greedy search, calculates the optimum value of the discount factor.stepwise.forward
Estimate subject's full network: runs exhaustive search on very node.subject
Turns asymetric network into an symmetric network. Helper function to determine the detection of a connection while ignoring directionality.symmetric
Comparing connectivity strenght of two groups with FDR correction.ttest.nettest
Results from v.1.0 for unit tests.utestdata