Skip to contents

MetricGraph package

MetricGraph MetricGraph-package
Gaussian processes on metric graphs
logo_lines()
Create lines for package name

Metric graph constructor

metric_graph
Metric graph
graph_components
Connected components of metric graph

INLA and SPDE approach on metric graphs

graph_spde()
'INLA' implementation of Whittle-Matérn fields for metric graphs
spde_metric_graph_result()
Metric graph SPDE result extraction from 'INLA' estimation results
summary(<metric_graph_spde_result>)
Summary for posteriors of field parameters for an inla_rspde model from a rspde.result object
gg_df(<metric_graph_spde_result>)
Data frame for metric_graph_spde_result objects to be used in 'ggplot2'
graph_data_spde()
Data extraction for 'spde' models
graph_spde_basis()
Observation/prediction matrices for 'SPDE' models
graph_spde_make_A()
Deprecated - Observation/prediction matrices for 'SPDE' models

inlabru and SPDE approach on metric graphs

bru_get_mapper.inla_metric_graph_spde() ibm_n.bru_mapper_inla_metric_graph_spde() ibm_values.bru_mapper_inla_metric_graph_spde() ibm_jacobian.bru_mapper_inla_metric_graph_spde()
Metric graph 'inlabru' mapper
predict(<inla_metric_graph_spde>)
Predict method for 'inlabru' fits on Metric Graphs
predict(<rspde_metric_graph>)
Predict method for 'inlabru' fits on Metric Graphs for 'rSPDE' models
plot(<graph_bru_pred>)
Plot of predicted values with 'inlabru'
graph_bru_process_data()
Prepare data frames or data lists to be used with 'inlabru' in metric graphs

Linear mixed-effects models

graph_lme()
Metric graph linear mixed effects models
predict(<graph_lme>)
Prediction for a mixed effects regression model on a metric graph
simulate(<graph_lme>)
Simulation of models on metric graphs
summary(<graph_lme>)
Summary Method for graph_lme Objects
posterior_crossvalidation()
Leave-one-out crossvalidation for graph_lme models assuming observations at the vertices of metric graphs
graph_starting_values()
Starting values for random field models on metric graphs
glance(<graph_lme>)
Glance at a graph_lme object
augment(<graph_lme>)
Augment data with information from a graph_lme object

Log-Cox Gaussian processes

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

Space-time models

simulate_spacetime()
space-time simulation based on implicit Euler discretization in time
make_Q_euler()
Space-time precision operator Euler discretization
make_Q_spacetime()
Space-time precision operator discretization

Sampling SPDE on metric graphs

sample_spde()
Samples a Whittle-Matérn field on a metric graph

Data manipulation on metric graphs

select(<metric_graph_data>)
A version of dplyr::select() function for datasets on metric graphs
filter(<metric_graph_data>)
A version of dplyr::filter() function for datasets on metric graphs
mutate(<metric_graph_data>)
A version of dplyr::mutate() function for datasets on metric graphs
summarise(<metric_graph_data>)
A version of dplyr::summarise() function for datasets on metric graphs
drop_na(<metric_graph_data>)
A version of tidyr::drop_na() function for datasets on metric graphs

Methods for metric graphs

summary(<metric_graph>)
Summary Method for metric_graph Objects

Precision matrices

spde_precision()
Precision matrix for Whittle-Matérn fields

Covariance functions

exp_covariance()
Exponential covariance function
spde_covariance()
Covariance function for Whittle-Matérn fields

Datasets

pems
Traffic speed data from San Jose, California