Learn R Programming

MetricGraph (version 1.4.1)

Random Fields on Metric Graphs

Description

Facilitates creation and manipulation of metric graphs, such as street or river networks. Further facilitates operations and visualizations of data on metric graphs, and the creation of a large class of random fields and stochastic partial differential equations on such spaces. These random fields can be used for simulation, prediction and inference. In particular, linear mixed effects models including random field components can be fitted to data based on computationally efficient sparse matrix representations. Interfaces to the R packages 'INLA' and 'inlabru' are also provided, which facilitate working with Bayesian statistical models on metric graphs. The main references for the methods are Bolin, Simas and Wallin (2024) , Bolin, Kovacs, Kumar and Simas (2023) and Bolin, Simas and Wallin (2023) and .

Copy Link

Version

Install

install.packages('MetricGraph')

Monthly Downloads

378

Version

1.4.1

License

GPL (>= 2)

Maintainer

David Bolin

Last Published

March 2nd, 2025

Functions in MetricGraph (1.4.1)

graph_spde_make_A

Deprecated - Observation/prediction matrices for 'SPDE' models
posterior_crossvalidation

Leave-one-out crossvalidation for graph_lme models assuming observations at the vertices of metric graphs
plot.graph_bru_proc_pred

Plot of processed predicted values with 'inlabru'
pems

Traffic speed data from San Jose, California
plot.graph_bru_pred

Plot of predicted values with 'inlabru'
metric_graph

Metric graph
make_Q_spacetime

Space-time precision operator discretization
mutate.metric_graph_data

A version of dplyr::mutate() function for datasets on metric graphs
predict.graph_lme

Prediction for a mixed effects regression model on a metric graph
%>%

Pipe operator
pems_repl

Traffic speed data with replicates from San Jose, California
process_rspde_predictions

Process predictions of rspde_metric_graph objects obtained by using inlabru
sample_spde

Samples a Whittle-Matérn field on a metric graph
predict.rspde_metric_graph

Predict method for 'inlabru' fits on Metric Graphs for 'rSPDE' models
simulate_spacetime

space-time simulation based on implicit Euler discretization in time
spde_covariance

Covariance function for Whittle-Matérn fields
predict.inla_metric_graph_spde

Predict method for 'inlabru' fits on Metric Graphs
select.metric_graph_data

A version of dplyr::select() function for datasets on metric graphs
psp.to.graph

Convert a psp object to a metric graph object
simulate.graph_lme

Simulation of models on metric graphs
selected_inv

Selected Inverse Calculation
summary.metric_graph

Summary Method for metric_graph Objects
spde_metric_graph_result

Metric graph SPDE result extraction from 'INLA' estimation results
stlpp.to.graph

Convert an stlpp object to a metric graph object
spde_variance

Variancefor Whittle-Matérn fields
summarise.metric_graph_data

A version of dplyr::summarise() function for datasets on metric graphs
summary.graph_lme

Summary Method for graph_lme Objects
summary.metric_graph_spde_result

Summary for posteriors of field parameters for an inla_rspde model from a rspde.result object
spde_precision

Precision matrix for Whittle-Matérn fields
MetricGraph-package

Gaussian processes on metric graphs
graph_components

Connected components of metric graph
drop_na.metric_graph_data

A version of tidyr::drop_na() function for datasets on metric graphs
bru_mapper.inla_metric_graph_spde

Metric graph 'inlabru' mapper
augment.graph_lme

Augment data with information from a graph_lme object
glance.graph_lme

Glance at a graph_lme object
filter.metric_graph_data

A version of dplyr::filter() function for datasets on metric graphs
exp_covariance

Exponential covariance function
graph_bru_process_data

Prepare data frames or data lists to be used with 'inlabru' in metric graphs
gg_df.metric_graph_spde_result

Data frame for metric_graph_spde_result objects to be used in 'ggplot2'
linnet.to.graph

Convert a linnet object to a metric graph object
logo_lines

Create lines for package name
graph_spde

'INLA' implementation of Whittle-Matérn fields for metric graphs
graph_lgcp

Simulation of log-Gaussian Cox processes driven by Whittle-Matérn fields on metric graphs
make_Q_euler

Space-time precision operator Euler discretization
graph_data_spde

Data extraction for 'spde' models
graph_lme

Metric graph linear mixed effects models
graph_starting_values

Starting values for random field models on metric graphs
graph_spde_basis

Deprecated - Observation/prediction matrices for 'SPDE' models