Description Usage Arguments Examples
Extract new plpData using plpModel settings use metadata in plpModel to extract similar data and population for new databases:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  | similarPlpData(
  plpModel = NULL,
  createCohorts = T,
  newConnectionDetails,
  newCdmDatabaseSchema = NULL,
  newCohortDatabaseSchema = NULL,
  newCohortTable = NULL,
  newCohortId = NULL,
  newOutcomeDatabaseSchema = NULL,
  newOutcomeTable = NULL,
  newOutcomeId = NULL,
  newOracleTempSchema = newCdmDatabaseSchema,
  sample = NULL,
  createPopulation = T
)
 | 
plpModel | 
 The trained PatientLevelPrediction model or object returned by runPlp()  | 
createCohorts | 
 Create the tables for the target and outcome - requires sql in the plpModel object  | 
newConnectionDetails | 
 The connectionDetails for the new database  | 
newCdmDatabaseSchema | 
 The database schema for the new CDM database  | 
newCohortDatabaseSchema | 
 The database schema where the cohort table is stored  | 
newCohortTable | 
 The table name of the cohort table  | 
newCohortId | 
 The cohort_definition_id for the cohort of at risk people  | 
newOutcomeDatabaseSchema | 
 The database schema where the outcome table is stored  | 
newOutcomeTable | 
 The table name of the outcome table  | 
newOutcomeId | 
 The cohort_definition_id for the outcome  | 
newOracleTempSchema | 
 The temp coracle schema  | 
sample | 
 The number of people to sample (default is NULL meaning use all data)  | 
createPopulation | 
 Whether to create the study population as well  | 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  | ## Not run: 
# set the connection
connectionDetails <- DatabaseConnector::createConnectionDetails()
   
# load the model and data
plpModel <- loadPlpModel("C:/plpmodel")
# extract the new data in the 'newData.dbo' schema using the model settings 
newDataList <- similarPlpData(plpModel=plpModel, 
                              newConnectionDetails = connectionDetails,
                              newCdmDatabaseSchema = 'newData.dbo',
                              newCohortDatabaseSchema = 'newData.dbo',   
                              newCohortTable = 'cohort', 
                              newCohortId = 1, 
                              newOutcomeDatabaseSchema = 'newData.dbo', 
                              newOutcomeTable = 'outcome',     
                              newOutcomeId = 2)    
               
# get the prediction:
prediction <- applyModel(newDataList$population, newDataList$plpData, plpModel)$prediction
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.