Closed sdaza closed 4 years ago
No, sim.fmsm
simulates a sample from a fitted model with parameters fixed at their maximum likelihood estimates. To get uncertainty around summaries of the sample, you could wrap bootci.fmsm
around the function that computes the summary. See the example in help(bootci.fmsm)
. This function is available in the GitHub version but not on CRAN yet.
Thanks! Do you know if I can use the output from bootci.fsm as input for the functionsim.fmsm
? Otherwise, just resampling would be an alternative.
It works like this - as explained in the help page.
summfn <- function(x, ...){
sim <- sim.fmsm(x, ...)
## [[ compute the summary you want here. ]]
}
mod <- flexsurvreg(...)
Then
bootci.fmsm(mod, fn=summfn, )
computes a bootstrap sample or a confidence interval for the summary you want.
Cool, thanks!
Hello, Thank you for such a great package.
I wonder if the
sim.fmsm
function considers the uncertainty of model coefficients and estimates. It seems thatmsfit.flexsurvreg
does.Thanks