The function Estimate_function_Stockholm_only_local outputs the Hessian matrix, which you convert to an estimated covariance matrix for the parameters on line 362 (referenced below). This information should be used when you simulate values for the parameters, as you do on lines 458-461, I think. You can draw simulations from a multivariate normal distribution using MASS::mvrnorm(n = 1000, mu = Est$par, Sigma = NeginvH2), for example.
The function
Estimate_function_Stockholm_only_local
outputs the Hessian matrix, which you convert to an estimated covariance matrix for the parameters on line 362 (referenced below). This information should be used when you simulate values for the parameters, as you do on lines 458-461, I think. You can draw simulations from a multivariate normal distribution usingMASS::mvrnorm(n = 1000, mu = Est$par, Sigma = NeginvH2)
, for example.https://github.com/FohmAnalys/SEIR-model-Stockholm/blob/bb616e970d6cb3f8b01edfe735b1a418480c6af2/Script/Estimate_SEIR_for_sharing_new_incidence.R#L362