Resampling from covariate database and from ETA distribution

Hi, I’m new to modelling and have developed a model but am now trying to simulate in an external dataset of 1000 patients. For this I need to do:

(I) nonparametric resampling from a covariate database

(ii) parametric sampling from the ETA distribution.

Can anyone advise on whether this is possible and how I would approach this?

in simulation predictive check mode you can simulate parametrically from your omega matrix of the etas

as for resampling from a covariate database the solution will be to do this step beforehand in R or other tools so you build a template simulation dataset that has the covariate distribution you are after.

so you will have a template data like this:
ID TIME COV1 DV
1 0 resampled value from data base mptyplace holder
.
1000

that you plug into model simulation note that if you simulate many replicates the covariate distribution will be fixed and will not chagne from replicate to replicate if you want that then

you might want to try other software tools Trial Simulator and or Trial Designer where you can easily resample from a csv file your covariate distribution with options random(random selection) or linear (in order sequential selection)

or just use Phoenix NLME in command line from R and script the data template and iterate

Dear all, I have a similar question: I have a popPK/PD model from ~300 subjects without covariates and 3 parameters with added ETA. I now want to do repeated simulations with only a limited numer of subjects (~10) to make aware that the predicted outcome for the next study cohort is also dependent on random and patient number (kind of expectation managemenrt :wink: ) I see the Option to do this with the VPC but I’m not shure if I should create a dataset with 10 subjects and then just 1 replicate or 1 subject with 10 replicates. Is there a difference if I have no covariates included?

Thanks, Conny

you can always plug in a “template dataset” as input to your model and simulate or fake a predictive check.

model developed with N1 subjects.

what happens if we simulate N2 subjects many times and study the ranges of possible outcomes ?

you cannot trust the outcome of 1 simulation you need to have 10 subjects and many replicates and see what you get from replicate to replicate and sum things up. But if you are predicting outcome for the next study you will need to take into account model (maybe with the new design your model can be less or more complicated) and parameter uncertainty ( standard errors of parameters)

Thanks ! The idea was to do the re-samplig of 10 subjects several times (“lim pred” 1-20) to visualize that the individual profiles you might get with limited number of subjects will differ from the Population prediction.

So if I have the template with 10 subjects and do many replicates for each, how do I plot the predicted individual effect profiles for the 10 subjects? I would do that then several times (20 “lim preds”), I read somewhere that you have to alter the seed value if you want to get different outcome for the following “lim preds” ?

do you have a simple example project to share so we can help you ?

I could provide a generic 2 comp. popPK model, without covariates, but I guess my question is not really closely related to the modelcode. It’s more a general question how I create new (e.g. 10) individual ct-profiles by sampling 10 parameter-sets from the pre-existing log-normal distribution (Theta / omega) and repeat that e.g.20 times to get 20 different “snapshots”. Is there a way to do that with e.g. VPC and a suitable template dataset?

please open a new topic and provide a minimal example project even if it is pure hypothetical. This will render the model reproducible with desired outputs and a framework to attain it.

you can code anything