R/RunMultiplePlp.R
savePredictionAnalysisList.Rd
Saves a json prediction settings given R settings
savePredictionAnalysisList( workFolder = "inst/settings", cohortIds, outcomeIds, cohortSettingCsv = file.path(workFolder, "CohortsToCreate.csv"), covariateSettingList, populationSettingList, modelSettingList, maxSampleSize = NULL, washoutPeriod = 0, minCovariateFraction = 0, normalizeData = T, testSplit = "person", testFraction = 0.25, splitSeed = 1, nfold = 3 )
workFolder | Location to save json specification |
---|---|
cohortIds | Vector of target population cohort ids |
outcomeIds | Vector of outcome cohort ids |
cohortSettingCsv | The location to the csv containing the cohort details |
covariateSettingList | A list of covariate settings |
populationSettingList | A list of population settings |
modelSettingList | A list of model settings |
maxSampleSize | If not NULL then max number of target population to sample for model training |
washoutPeriod | Minimum prior observation for each person in target pop to be included |
minCovariateFraction | Minimum covariate fraction to include |
normalizeData | Whether to normalise data |
testSplit | Split by person or time |
testFraction | Fractiuon of data to use for test set |
splitSeed | Seed used in test split |
nfold | Number of folds used when training model |
This function interprets a json with the multiple prediction settings and creates a list that can be combined with connection settings to run a multiple prediction study