get_MSD_with_grad {AIUQ} | R Documentation |
Construct MSD and MSD gradient with transformed parameters
Description
Construct mean squared displacement (MSD) and its gradient for a given stochastic process or a user defined MSD and gradient structure.
Usage
get_MSD_with_grad(theta, d_input, model_name, msd_fn = NA, msd_grad_fn = NA)
Arguments
theta |
transformed parameters in MSD function for MLE estimation |
d_input |
sequence of lag times |
model_name |
model name for the process, options from ('BM','OU','FBM', 'OU+FBM', 'user_defined'). |
msd_fn |
user defined MSD structure, a function of |
msd_grad_fn |
user defined MSD gradient structure, a function of
|
Details
Note for non user_defined
model, msd_fn
and msd_grad_fn
are not needed. For Brownian Motion, the MSD follows
MSD_{BM}(\Delta t) = \theta_1\Delta t= 4D\Delta t
where D
is the diffusion coefficient.
For Ornstein–Uhlenbeck process, the MSD follows
MSD_{OU}(\Delta t) = \theta_2(1-\frac{\theta_1}{1+\theta_1}^{\Delta t})
where \frac{\theta_1}{1+\theta_1}=\rho
is the correlation with previous steps.
For fractional Brownian Motion, the MSD follows
MSD_{FBM}(\Delta t) =\theta_1\Delta t^{\frac{2\theta_2}{1+\theta_2}}
where \frac{2\theta_2}{1+\theta_2}=2H
with H
is the the Hurst parameter.
For 'OU+FBM', the MSD follows
MSD_{OU+FBM}(\Delta t) = \theta_2(1-\frac{\theta_1}{1+\theta_1}^{\Delta t})+\theta_3\Delta t^{\frac{2\theta_4}{1+\theta_4}}
Value
A list of two variables, MSD and MSD gradient.
Author(s)
Yue He [aut], Xubo Liu [aut], Mengyang Gu [aut, cre]
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
library(AIUQ)
msd_fn <- function(param, d_input){
beta = 2*param[1]^2
MSD = beta*d_input
}
msd_grad_fn <- function(param, d_input){
MSD_grad = 4*param[1]*d_input
}
theta = 2
d_input = 0:10
model_name = "user_defined"
MSD_list = get_MSD_with_grad(theta=theta,d_input=d_input,
model_name=model_name,msd_fn=msd_fn,
msd_grad_fn=msd_grad_fn)
MSD_list$msd
MSD_list$msd_grad