| ms_montecarlo | R Documentation |
Repeatedly simulates panel data from a known generator, fits the model, and summarises finite-sample performance. Every summary carries its Monte Carlo standard error, so that differences smaller than the simulation noise are not read as findings, and convergence is taken from the optimiser's code rather than from the absence of an error.
ms_montecarlo(process, n = c(100, 300, 500), B = 1000, t = 10,
Q = NULL, truth = NULL, horizon = 5, sim_args = list(),
seed = NULL, verbose = TRUE)
process |
Character. One of |
n |
Integer vector of sample sizes. |
B |
Integer. Replicates per cell. |
t |
Numeric. Observation window. |
Q |
Optional generator; defaults to the reference generator. |
truth |
Optional vector of true intensities in row-major order of the permitted transitions. |
horizon |
Numeric. Horizon for the transition probability matrix. |
sim_args |
List of further arguments passed to
|
seed |
Optional integer seed. |
verbose |
Logical. Report progress by cell. |
A data frame with one row per parameter and sample size holding the truth, the mean estimate, bias, relative bias, empirical standard error, RMSE and coverage, each with its Monte Carlo standard error, together with the non-convergence rate and the number of converged replicates.
fit_msm
ms_montecarlo("two_state", n = 100, B = 25, seed = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.