Function to be called by predict_inactivation_MCMC
. Produces
a random sample of the parameters adjusted from dynamic experiments with non
linear regression.
sample_dynaFit(dynamic_fit, times, n_simulations)
Returns a list with 4 components.
par_sample: data frame with the parameter sample.
simulation_model: model key for the simulation
known_pars: parameters of the model known
times: points where the calculation is made.
An object of class FitInactivationMCMC
as generated
by fit_inactivation_MCMC
.
numeric vector specifying the time points when results are
desired. If NULL
, the times in MCMC_fit$best_prediction
are used.
a numeric indicating how many Monte Carlo simulations to perform.
It is assumed that the parameters follow a Multivariate Normal distribution with the mean the parameters estimated by FME::modFit. The unscaled covariance matrix returned by FME::modFit is used.
The function produces a random sample.