Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed problem when splitting covariate and not stratifying by ID
- Loading branch information
Schuemie
authored and
Schuemie
committed
Aug 28, 2017
1 parent
1a2fe1e
commit 550e641
Showing
6 changed files
with
100 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
library(SelfControlledCaseSeries) | ||
options(fftempdir = "c:/fftemp") | ||
|
||
rw <- createSimulationRiskWindow(start = 0, | ||
end = 0, | ||
addExposedDaysToEnd = TRUE, | ||
relativeRisks = 2) | ||
|
||
settings <- createSccsSimulationSettings(covariateIds = c(1,2), | ||
simulationRiskWindows = list(rw, rw)) | ||
|
||
sccsData <- simulateSccsData(10000, settings) | ||
|
||
covarSettings <- createCovariateSettings(label = "Exposures of interest", | ||
includeCovariateIds = c(1,2), | ||
stratifyById = FALSE, | ||
start = 0, | ||
end = 0, | ||
addExposedDaysToEnd = TRUE, | ||
splitPoints = 7) | ||
|
||
sccsEraData <- createSccsEraData(sccsData, | ||
naivePeriod = 0, | ||
firstOutcomeOnly = FALSE, | ||
covariateSettings = covarSettings) | ||
|
||
model <- fitSccsModel(sccsEraData) | ||
|
||
summary(model) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters