Yes, just specify the two covariate IDs in includeCovariateIds. This assumes that the covariates were constructed when calling getDbCohortMethodData (in other words, they were implied in your covariateSettings). Note that you need to specify covariate IDs, which are not the same as concept IDs.
There is one thing, that still remains unclear for me. I’m using runCmAnalyses function, which takes includeCovariateIds as an input parameter (not directly, but via function createFitOutcomeModelArg ). getDbCohortMethodData is called within runCmAnalyses. So, in fact, I have to specify includeCovariateIds before the covariates were constructed?
Is there any other way to specify includeCovariateIds for outcome mode using runCmAnalyses? If not it looks as I have to run getDbCohortMethodData separately, then get ids for age and gender and hardcode them into runCmAnalyses.
Yes, runCmAnalysis requires you to prespecify everything, and only then executes the entire set of analyses. Note that the covariate IDs are deterministic, designed to be identical for every run on every platform. Most covariate IDs are simply concept ID * 1000 + analysis ID. So for example, analysis ID 101 indicates conditions observed any time prior.The covariate ID for concept 254761 (‘Cough’) observed any time prior is therefore 254761101.
Some covariates are not based on specific concepts (e.g. age), and some are more complex (e.g. when combining a measurement concept with a unit concept), but the principle remains: the covariateID will always be the same.