Learn R Programming

AIUQ (version 0.5.3)

plot_MSD: Plot estimated MSD with uncertainty from SAM class

Description

Function to plot estimated MSD with uncertainty from SAM class, versus true mean squared displacement(MSD) or given reference values.

Usage

plot_MSD(object, msd_truth = NA, title = NA, log10 = TRUE)

Value

A plot of estimated MSD with uncertainty versus truth/reference values.

Arguments

object

an S4 object of class SAM

msd_truth

a vector/matrix of true MSD or reference MSD value, default is NA

title

main title of the plot. If NA, title is "model_name" with model_name being a field in SAM class representing fitted model.

log10

a logical evaluating to TRUE or FALSE indicating whether a plot in log10 scale is generated

Author

tools:::Rd_package_author("AIUQ")

References

Gu, M., He, Y., Liu, X., & Luo, Y. (2023). Ab initio uncertainty quantification in scattering analysis of microscopy. arXiv preprint arXiv:2309.02468.

Gu, M., Luo, Y., He, Y., Helgeson, M. E., & Valentine, M. T. (2021). Uncertainty quantification and estimation in differential dynamic microscopy. Physical Review E, 104(3), 034610.

Examples

Run this code
library(AIUQ)

## Simulate BM and get estimated parameters with uncertainty using BM model
# Simulation
set.seed(1)
sim_bm = simulation(sz=100,len_t=100,sigma_bm=0.5)
show(sim_bm)

# AIUQ method: fitting using BM model
sam = SAM(sim_object=sim_bm, uncertainty=TRUE,AIUQ_thr=c(0.999,0))
show(sam)

plot_MSD(object=sam, msd_truth=sam@msd_truth) #in log10 scale
plot_MSD(object=sam, msd_truth=sam@msd_truth,log10=FALSE) #in real scale

Run the code above in your browser using DataLab