The goal is to generate a dataset that matches the marginal distributions of attributes in the reference data. The following NPSEM defines the dependencies that govern the joint distribution of the simulated data. The NPSEM places no restriction on the functional forms of the relationships. Random variation is introduced through independent exogenous variables, ${U}_{x}$ (where *x* indexes the variable), based on values in the transition probability tables. The first set of eqs (1) corresponds to baseline characteristics:
$\begin{array}{rl}gender& ={f}_{gender}({U}_{gender}),\\ age& ={f}_{age}(gender,{U}_{age}),\\ conditionCount& ={f}_{conditionCount}(gender,age,{U}_{conditionCount}),\\ obsTime& ={f}_{obsTime}(gender,age,condCountCategory,{U}_{obsTime}),\\ drugCount\phantom{\rule{1pt}{0ex}}& ={f}_{drugCount}(gender,ageCategory,condCountCategory,{U}_{drugCount}).\end{array}$(1)

According to OSIM2 documentation, some dependencies involve only categorical versions of *age* and *conditionCount* (*ageCategory*, *condCountCategory*, respectively). The NPSEM encodes this domain knowledge in the equations for *obsTime* and *drugCount*. Substantively, this indicates that simulated data are stable with respect to slight perturbation in the distribution of the reference data.

Next, medical conditions (*condition*) are assigned to a subject’s timeline in sequence, as a function of baseline covariates and the most recent previous condition (*prevCond*). The set of eqs (2) describes simulated medical conditions, how often they re-occur ($\mathrm{\Delta}day{s}_{CC}$), how many re-occurrences (*numEras*) and at what intervals ($\mathrm{\Delta}reoccur$):
$\begin{array}{rl}condition& ={f}_{condition}(gender,age,ageCategory,condCountCategory,\\ & \phantom{\rule{1em}{0ex}}\phantom{\rule{thickmathspace}{0ex}}obsTime,time,prevCond,{U}_{cond}),\\ \phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\mathrm{\Delta}day{s}_{CC}& ={f}_{\mathrm{\Delta}daysCC}(gender,age,ageCategory,condCountCategory,\\ & \phantom{\rule{1em}{0ex}}\phantom{\rule{thickmathspace}{0ex}}obsTime,time,prevCond,{U}_{\mathrm{\Delta}daysCC}),\\ \phantom{\rule{thinmathspace}{0ex}}numEras& ={f}_{numEras}(condition,condCountCategory,obsTime,\\ & \phantom{\rule{1em}{0ex}}\phantom{\rule{thickmathspace}{0ex}}time,{U}_{numEras}),\\ \mathrm{\Delta}reoccur& ={f}_{\mathrm{\Delta}reoccur}(ageCategory,condition,obsTime,time,{U}_{\mathrm{\Delta}reoccur}).\end{array}$(2)

After all medical conditions are in place, drug exposures are added to each subject’s timeline. The following eqs (3) specify non-parametric models for the number of drug exposures for each occurrence of a condition ($numDrug{s}_{condEra}$), the identity of the drug ($dru{g}_{condEra}$), the number of days from onset to prescription ($\mathrm{\Delta}day{s}_{condEraDrug}$) and the length of the exposure ($drugDuratio{n}_{condEra}$). In these equations, *drugCountCategory* is a categorical version of *drugCount* and *numCurrentCond* is a counter that is incremented as each condition is added to the timeline:
$\begin{array}{rl}numDrug{s}_{condEra}& ={f}_{numDrug{s}_{condEra}}(gender,ageCategory,condCountCategory,\\ & \phantom{\rule{1em}{0ex}}\phantom{\rule{thickmathspace}{0ex}}drugCount,{U}_{numDrug{s}_{condEra}})\\ dru{g}_{condEra}& ={f}_{dru{g}_{condEra}}(gender,ageCategory,condCountCategory,\\ & \phantom{\rule{1em}{0ex}}\phantom{\rule{thickmathspace}{0ex}}drugCountCategory,condition,numCurrentCond,{U}_{dru{g}_{condEra}})\\ \mathrm{\Delta}day{s}_{condEraDrug}& ={f}_{\mathrm{\Delta}day{s}_{condEraDrug}}(gender,ageCategory,condCountCategory,\\ & \phantom{\rule{1em}{0ex}}\phantom{\rule{thickmathspace}{0ex}}drugCountCategory,condition,numCurrentCond,{U}_{\mathrm{\Delta}day{s}_{condEraDrug}})\\ drugEraCoun{t}_{condEra}& ={f}_{drugEraCoun{t}_{condEra}}(ageCategory,condCountCategory,drug,\\ & \phantom{\rule{1em}{0ex}}\phantom{\rule{thickmathspace}{0ex}}drugCountCategory,obsTime,time,{U}_{drugEraCount})\\ drugDuratio{n}_{condEra}& ={f}_{drugDuratio{n}_{condEra}}(ageCategory,condCountCategory,drug,\\ & \phantom{\rule{1em}{0ex}}\phantom{\rule{thickmathspace}{0ex}}drugCountCategory,obsTime,time,{U}_{drugEraCount},{U}_{expPerDru{g}_{condEra}}).\end{array}$3

## Comments (0)

General note:By using the comment function on degruyter.com you agree to our Privacy Statement. A respectful treatment of one another is important to us. Therefore we would like to draw your attention to our House Rules.