diff --git a/DESCRIPTION b/DESCRIPTION index d1291c6..a7f78f7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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 = "mohsen.sadatsafavi@ubc.ca", role = c("aut", "cph")), person("Amin", "Adibi", email = "adibi@alumni.ubc.ca", role = c("aut", "cre")), person("Kate", "Johnson", email = "kate.johnson@alumni.ubc.ca", 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) . 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, diff --git a/R/calibration.R b/R/calibration.R index 83e7d9c..f3b14f1 100644 --- a/R/calibration.R +++ b/R/calibration.R @@ -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) { @@ -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)) diff --git a/R/input.R b/R/input.R index 7a53581..17012d3 100644 --- a/R/input.R +++ b/R/input.R @@ -216,11 +216,11 @@ init_input <- function() { input_help$COPD$ln_h_COPD_betas_by_sex <- "Log-hazard of developing COPD (FEV1/FVC