Hi All,
I’m trying to add some extra characterizations for an estimation study we are doing. In particular, we wanted to add statistics of Age at Index to our results. With @Patrick_Ryan’s help, I found that covariateId 1002 was what I needed.
When I tried running the following code
covariateSettings <- FeatureExtraction::createDefaultCovariateSettings(includedCovariateIds = c(1002))
covariateData2 <- FeatureExtraction::getDbCovariateData(connectionDetails = connectionDetails,
cdmDatabaseSchema = cdmDatabaseSchema,
cohortDatabaseSchema = cohortDatabaseSchema,
cohortTable = cohortTable,
cohortId = 1771647,
covariateSettings = covariateSettings,
aggregated = TRUE)
I got this error:
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, :
org.json.JSONException: JSONObject["isBinary"] not found.
However, when I call FeatureExtration::createCovariateSettings() and list out all the parameters I want, it works for me. Is there a way to call createDefaultCovariateSettings() and enable one of the demographics covariates?
Also, is there a way to add this to Table1? When I get the above working with createCovariateSettings(…), I make this call:
FeatureExtraction::createTable1(covariateData2)
However, I don’t see the Age statistics. I only see the AgeGroup stats, but when I call covariateData2$covariatesContinuous, I see the Age at Index stats. @schuemie do you have any recommendations?
Thanks in advance!