Skip to content

Commit

Permalink
COPD incidence recalibrated
Browse files Browse the repository at this point in the history
  • Loading branch information
aminadibi committed Jun 23, 2022
1 parent 83629f6 commit f8ee173
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
Package: epicR
Title: R Package for Evaluation Platform in COPD
Version: 0.28.2.999
Version: 0.29.0
Authors@R: c(
person("Mohsen", "Sadatsafavi", email = "[email protected]", role = c("aut", "cph")),
person("Amin", "Adibi", email = "[email protected]", role = c("aut", "cre")),
person("Kate", "Johnson", email = "[email protected]", role = c("aut")))
Description: Evaluation Platform in COPD (EPIC) is a Discrete Event Simulation (DES) model that simulates health outcomes of COPD patients based on demographics and individual-level risk factors, based on the model published in Sadatsafavi et al. (2019) <doi:10.1177/0272989X18824098>.
Depends:
R (>= 3.6.0)
R (>= 4.1.0)
License: GPL-3
Encoding: UTF-8
LazyData: true
Imports:
Rcpp (>= 1.0.6),
RcppArmadillo (>= 0.10.1),
Rcpp (>= 1.0.8),
RcppArmadillo (>= 0.11.2),
graphics,
stats,
ggplot2 (>= 3.1.0),
ggplot2 (>= 3.3.6),
ggthemes,
sqldf,
jsonlite,
Expand Down
6 changes: 3 additions & 3 deletions R/calibration.R
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ calibrate_smoking <- function() {
#' @return regression co-efficients as files
#' @export

calibrate_COPD_inc<-function(nIterations=500,
calibrate_COPD_inc<-function(nIterations=100,
nPatients=100000,
time_horizon=20)
{
Expand Down Expand Up @@ -291,8 +291,8 @@ calibrate_COPD_inc<-function(nIterations=500,
plot(ggplot2::qplot(iteration, resid_intercept_men, data=iteration_resid, size=I(1), main = "Residue for logit intercept - Men"))
plot(ggplot2::qplot(iteration, resid_intercept_women, data=iteration_resid, size=I(1), main = "Residue for logit intercept - Women"))

res_male<-glm(data=dataF[which(dataF[,'sex']==0),],formula=copd~age+pack_years+year,family=binomial(link=logit))
res_female<-glm(data=dataF[which(dataF[,'sex']==1),],formula=copd~age+pack_years+year,family=binomial(link=logit))
res_male<-glm(data=dataF[which(dataF[,'female']==0),],formula=copd~age+pack_years+year,family=binomial(link=logit))
res_female<-glm(data=dataF[which(dataF[,'female']==1),],formula=copd~age+pack_years+year,family=binomial(link=logit))

message(coefficients(res_male))
message(coefficients(res_female))
Expand Down
6 changes: 3 additions & 3 deletions R/input.R
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@ init_input <- function() {


input_help$COPD$ln_h_COPD_betas_by_sex <- "Log-hazard of developing COPD (FEV1/FVC<LLN) for those who did not have COPD at creation time (separately by sex)"
input$COPD$ln_h_COPD_betas_by_sex <- cbind(male = c(Intercept = -7.86555434, age = 0.03261784, age2 = 0, pack_years = 0.03076498,
input$COPD$ln_h_COPD_betas_by_sex <- cbind(male = c(Intercept = -7.97107937, age = 0.03245063, age2 = 0, pack_years = 0.03578899,
smoking_status = 0, year = 0, asthma = 0),
female = c(Intercept = -7.75884176, age = 0.02793072, age2 = 0, pack_years = 0.04184035,
female = c(Intercept = -7.78520064, age = 0.02975571, age2 = 0, pack_years = 0.04087865,
smoking_status = 0, year = 0, asthma = 0))
input_ref$COPD$ln_h_COPD_betas_by_sex <- "Amin's Iterative solution. Last Updated on 2018-02-10 (0.18.0)"
input_ref$COPD$ln_h_COPD_betas_by_sex <- "Amin's Iterative solution. Last Updated on 2022-06-33 (0.29.0)"


## Lung function
Expand Down

0 comments on commit f8ee173

Please sign in to comment.