blasern / gems

general multistate simulation model
0 stars 0 forks source link

user-specified function needs #1

Open jaclynbeca opened 2 years ago

jaclynbeca commented 2 years ago

I have been trying to simulate data with a baseline age and a manually-specified gompertz function and it runs as long as n <=1000, while over 1000 I get this error: Error in msm::rexp(n, rate, time) : length of t must be equal to length of rate The only thread I could find online about it indicated to increase the value of sampler.steps https://stats.stackexchange.com/questions/486729/generating-weibull-survival-times-using-the-built-in-rweibull-function-vs-manual which I have done but it runs extremely slowly, as I want to generate a sample of 100,000 individuals and so it only works when I set sampler.steps = 100000. Are there any other solutions or reason for this issue that will enable it to run?

blasern commented 2 years ago

I cannot reproduce this issue. Could you please add a reproducible example.