Hi Eljas,
What I read through the “Building Single Patient-Level Predictive Models” vignette seems quite accurate and up-to-date. A possible issue one may encounter with this introductory vignette is probably a lack of a database that includes the cohorts of interest to reproduce the examples. In case you don’t have access to one, an option could be a generation of a synthetic dataset locally on your machine and making sure you include cohorts of patients with the outcomes of interest. However, using Eunomia is probably faster if you just want to check out the package’s functionalities.
Are you asking for an example of how to use the package with the Eunomia dataset? Then that is also possible. First build your Eunomia cohorts and given the cohorts in the dataset, let’s assume that you want to explore the problem of “Among new users of Celecoxib (T cohort), which patients will experience GI bleed(O cohort) within 365 days”. In Eunomia, patients for the T are represented by cohortId “1” and patients in the O are represented by cohortId “3”. Then, following the steps of the vignette from section 3.2.5 (Data Extraction) and onwards, making sure you replace the cohortId and outcomeIds respectively will allow you to have a run of this problem using Eunomia cohorts. Make sure to also use relevant arguments for cdmDatabaseSchema, cohortTable etc for Eunomia.
TL;DR Given that you have build your Eunomia dataset, you only need to specify correctly the PatientLevelPrediction::createDatabaseDetails()
function, where you enter the cohort and outcome ids as well as the schema and table names where your cohorts sit. In Eunomia, all tables are in the “main” schema and all cohorts in the “cohorts” table.
Let me know if something is unclear.
Best!