Argument error when converting simulations to population for fitting

Hello,

I’m getting the following error when trying to convert a simulation (simobs) to a population (simdf)
ERROR: ArgumentError: column(s) amt, cmt and rate are missing from argument(s) 2

Although I do have those columns in the population (read_pumas).
Any suggestions?

I’m not sure why what you’re doing is not working for you but you should be able to bypass the extra steps of converting to and from a DataFrame.

Try calling

sim= simobs(.......)
Subject.(sim)

This will broadcast the Subject constructor over all your simulated observations and the result should be a Population.

Cheers,
Niklas

Thank you Niklas! this worked!