Hi all,
I’m researching association between Benzodiazepine drugs and fracture using SelfControlledCaseSeries package.
Below is the code I used.
sql ← readSql(“vignette_BZD_Fracture.sql”)
sql ← renderSql(sql,
cdmDatabaseSchema = cdmDatabaseSchema,
cohortDatabaseSchema = cohortDatabaseSchema,
outcomeTable = outcomeTable)$sql
sql ← translateSql(sql, targetDialect = connectionDetails$dbms)$sql
connection ← connect(connectionDetails)
executeSql(connection, sql)
BDZ ← c(704599,708298,723013,744740,756349,781039,791967,
798874,990678,19030353,19039262,19044883,19050832,
19055224,19068821,19080959,19095467,19100773) #BDZ
sccsData ← getDbSccsData(connectionDetails = connectionDetails,
cdmDatabaseSchema = cdmDatabaseSchema,
oracleTempSchema = cdmDatabaseSchema,
outcomeDatabaseSchema = cohortDatabaseSchema,
outcomeTable = outcomeTable,
outcomeIds = 4,
exposureDatabaseSchema = cdmDatabaseSchema,
exposureTable = “drug_era”,
exposureIds = BDZ,
cdmVersion = cdmVersion)
covarateSplit = createCovariateSettings(label = “Exposure of Benzodiazepine”,
includeCovariateIds = BDZ,
stratifyById = FALSE,
start = 0,
end = 120,
addExposedDaysToEnd = TRUE,
splitPoints = c(28,56,84)
)
covariatePreSplit = createCovariateSettings(label = “Pre-exposure”,
includeCovariateIds = BDZ,
stratifyById = FALSE,
start = -28,
end = -1
)
sccsEraData ← createSccsEraData(sccsData,
naivePeriod = 100,
firstOutcomeOnly = FALSE,
covariateSettings = list(covarateSplit,
covariatePreSplit)
)
model ← fitSccsModel(sccsEraData)
summary(model)
To estimate a single incidence rate ratio for all exposure concept ids, I used ‘stratifyById = FALSE’ parameter.
I Also used ‘splitPoints = c(28,56,84)’ to split the risk period into four sections.
But the result shows only the first section of the split risk period, and ‘NA’.
When I didn’t use the ‘stratifyById = FALSE’ parameter, the result estimate about all risk periods for each exposure concept ids.
So, my question is how to use the stratifyById and splitPoints parameters together.
Thank you.