Skip to contents

Load the multiple prediction json settings from a file

Usage

loadPlpAnalysesJson(jsonFileLocation)

Arguments

jsonFileLocation

The location of the file 'predictionAnalysisList.json' with the modelDesignList

Value

A list with the modelDesignList and cohortDefinitions

Details

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

Examples

modelDesign <- createModelDesign(targetId = 1, outcomeId = 2, 
                                 modelSettings = setLassoLogisticRegression())
saveLoc <- file.path(tempdir(), "loadPlpAnalysesJson")
savePlpAnalysesJson(modelDesignList = modelDesign, saveDirectory = saveLoc)
#> [1] "/tmp/RtmpPJeNgk/loadPlpAnalysesJson/predictionAnalysisList.json"
loadPlpAnalysesJson(file.path(saveLoc, "predictionAnalysisList.json"))
#> $plpVersion
#> [1] "6.4.0"
#> 
#> $analyses
#> $analyses[[1]]
#> $targetId
#> [1] 1
#> 
#> $outcomeId
#> [1] 2
#> 
#> $restrictPlpDataSettings
#> $studyStartDate
#> [1] ""
#> 
#> $studyEndDate
#> [1] ""
#> 
#> $firstExposureOnly
#> [1] FALSE
#> 
#> $washoutPeriod
#> [1] 0
#> 
#> $sampleSize
#> NULL
#> 
#> attr(,"class")
#> [1] "restrictPlpDataSettings"
#> 
#> $covariateSettings
#> $temporal
#> [1] FALSE
#> 
#> $temporalSequence
#> [1] FALSE
#> 
#> $DemographicsGender
#> [1] TRUE
#> 
#> $DemographicsAgeGroup
#> [1] TRUE
#> 
#> $DemographicsRace
#> [1] TRUE
#> 
#> $DemographicsEthnicity
#> [1] TRUE
#> 
#> $DemographicsIndexYear
#> [1] TRUE
#> 
#> $DemographicsIndexMonth
#> [1] TRUE
#> 
#> $ConditionGroupEraLongTerm
#> [1] TRUE
#> 
#> $ConditionGroupEraShortTerm
#> [1] TRUE
#> 
#> $DrugGroupEraLongTerm
#> [1] TRUE
#> 
#> $DrugGroupEraShortTerm
#> [1] TRUE
#> 
#> $DrugGroupEraOverlapping
#> [1] TRUE
#> 
#> $ProcedureOccurrenceLongTerm
#> [1] TRUE
#> 
#> $ProcedureOccurrenceShortTerm
#> [1] TRUE
#> 
#> $DeviceExposureLongTerm
#> [1] TRUE
#> 
#> $DeviceExposureShortTerm
#> [1] TRUE
#> 
#> $MeasurementLongTerm
#> [1] TRUE
#> 
#> $MeasurementShortTerm
#> [1] TRUE
#> 
#> $MeasurementRangeGroupLongTerm
#> [1] TRUE
#> 
#> $MeasurementRangeGroupShortTerm
#> [1] TRUE
#> 
#> $MeasurementValueAsConceptLongTerm
#> [1] TRUE
#> 
#> $MeasurementValueAsConceptShortTerm
#> [1] TRUE
#> 
#> $ObservationLongTerm
#> [1] TRUE
#> 
#> $ObservationShortTerm
#> [1] TRUE
#> 
#> $ObservationValueAsConceptLongTerm
#> [1] TRUE
#> 
#> $ObservationValueAsConceptShortTerm
#> [1] TRUE
#> 
#> $CharlsonIndex
#> [1] TRUE
#> 
#> $Dcsi
#> [1] TRUE
#> 
#> $Chads2
#> [1] TRUE
#> 
#> $Chads2Vasc
#> [1] TRUE
#> 
#> $includedCovariateConceptIds
#> list()
#> 
#> $includedCovariateIds
#> list()
#> 
#> $addDescendantsToInclude
#> [1] FALSE
#> 
#> $excludedCovariateConceptIds
#> list()
#> 
#> $addDescendantsToExclude
#> [1] FALSE
#> 
#> $shortTermStartDays
#> [1] -30
#> 
#> $mediumTermStartDays
#> [1] -180
#> 
#> $endDays
#> [1] 0
#> 
#> $longTermStartDays
#> [1] -365
#> 
#> attr(,"class")
#> [1] "covariateSettings"
#> attr(,"fun")
#> [1] "getDbDefaultCovariateData"
#> 
#> $populationSettings
#> $binary
#> [1] TRUE
#> 
#> $includeAllOutcomes
#> [1] TRUE
#> 
#> $firstExposureOnly
#> [1] FALSE
#> 
#> $washoutPeriod
#> [1] 0
#> 
#> $removeSubjectsWithPriorOutcome
#> [1] TRUE
#> 
#> $priorOutcomeLookback
#> [1] 99999
#> 
#> $requireTimeAtRisk
#> [1] TRUE
#> 
#> $minTimeAtRisk
#> [1] 364
#> 
#> $riskWindowStart
#> [1] 1
#> 
#> $startAnchor
#> [1] "cohort start"
#> 
#> $riskWindowEnd
#> [1] 365
#> 
#> $endAnchor
#> [1] "cohort start"
#> 
#> $restrictTarToCohortEnd
#> [1] FALSE
#> 
#> attr(,"class")
#> [1] "populationSettings"
#> 
#> $sampleSettings
#> $sampleSettings[[1]]
#> $numberOutcomestoNonOutcomes
#> [1] 1
#> 
#> $sampleSeed
#> [1] 1
#> 
#> attr(,"class")
#> [1] "sampleSettings"
#> attr(,"fun")
#> [1] "sameData"
#> 
#> 
#> $featureEngineeringSettings
#> $featureEngineeringSettings[[1]]
#> named list()
#> attr(,"class")
#> [1] "featureEngineeringSettings"
#> attr(,"fun")
#> [1] "sameData"
#> 
#> 
#> $preprocessSettings
#> $minFraction
#> [1] 0.001
#> 
#> $normalize
#> [1] TRUE
#> 
#> $removeRedundancy
#> [1] TRUE
#> 
#> attr(,"class")
#> [1] "preprocessSettings"
#> 
#> $modelSettings
#> $fitFunction
#> [1] "fitCyclopsModel"
#> 
#> $param
#> $param$priorParams
#> $param$priorParams$priorType
#> [1] "laplace"
#> 
#> $param$priorParams$forceIntercept
#> [1] FALSE
#> 
#> $param$priorParams$variance
#> [1] 0.01
#> 
#> $param$priorParams$exclude
#> [1] 0
#> 
#> 
#> $param$includeCovariateIds
#> NULL
#> 
#> $param$upperLimit
#> [1] 20
#> 
#> $param$lowerLimit
#> [1] 0.01
#> 
#> $param$priorCoefs
#> NULL
#> 
#> attr(,"settings")
#> attr(,"settings")$priorfunction
#> [1] "Cyclops::createPrior"
#> 
#> attr(,"settings")$selectorType
#> [1] "byPid"
#> 
#> attr(,"settings")$crossValidationInPrior
#> [1] TRUE
#> 
#> attr(,"settings")$modelType
#> [1] "logistic"
#> 
#> attr(,"settings")$addIntercept
#> [1] TRUE
#> 
#> attr(,"settings")$useControl
#> [1] TRUE
#> 
#> attr(,"settings")$seed
#> [1] 81218033
#> 
#> attr(,"settings")$name
#> [1] "Lasso Logistic Regression"
#> 
#> attr(,"settings")$threads
#> [1] -1
#> 
#> attr(,"settings")$tolerance
#> [1] 2e-06
#> 
#> attr(,"settings")$cvRepetitions
#> [1] 1
#> 
#> attr(,"settings")$maxIterations
#> [1] 3000
#> 
#> attr(,"modelType")
#> [1] "binary"
#> attr(,"saveType")
#> [1] "RtoJson"
#> 
#> attr(,"class")
#> [1] "modelSettings"
#> 
#> $splitSettings
#> $test
#> [1] 0.25
#> 
#> $train
#> [1] 0.75
#> 
#> $seed
#> [1] 76614
#> 
#> $nfold
#> [1] 3
#> 
#> attr(,"class")
#> [1] "splitSettings"
#> attr(,"fun")
#> [1] "randomSplitter"
#> 
#> $executeSettings
#> $runSplitData
#> [1] TRUE
#> 
#> $runSampleData
#> [1] FALSE
#> 
#> $runFeatureEngineering
#> [1] FALSE
#> 
#> $runPreprocessData
#> [1] FALSE
#> 
#> $runModelDevelopment
#> [1] TRUE
#> 
#> $runCovariateSummary
#> [1] TRUE
#> 
#> attr(,"class")
#> [1] "executeSettings"
#> 
#> attr(,"class")
#> [1] "modelDesign"
#> 
#> 
#> $cohortDefinitions
#> NULL
#> 
# clean use
unlink(saveLoc, recursive = TRUE)