library(pbapply, quietly = TRUE) setwd("C:/Users/nathan.green/Documents/chlamydia/classifier") #PHE homedrive # setwd("E:/NGreen/Chlamydia/classifier") #usb ## data preprocessing and cleaning functions source("./R_code/Chlamydia_classifier/sim_logistic_regn/classifier_fns.R")
Load-in functions, raw data and preprocess for analysis
# source("./data_config.R") setwd("./R_code/Chlamydia_classifier/sim_logistic_regn/workspaces/config") load(file = file.choose()) setwd("../../../../../")
Simulate LA populations as weighted random samples for use in NATSAL classifier prediction
## slow! # source("./locallevel_pop_sim.R") ## res[[...]] # load(file=file.choose()) load("./data/output/LAsim/LAsim_submodel_1634_n10000.RData") #output # load("./data/output/LAsim/LAsim_submodel_1624_n10000.RData")
STI risk factor regression/classifier of NATSAL data
# source("./model_fitting.R") ## deprecated # data.covshift <- pblapply(res, function(x) covariateShift(data[1:10000,], resla=x, riskfac)) # fit.model <- c(pblapply(data.covshift, function(x) fitModel(x, x, riskfac, depvar="cttestly")), res=list(res)) ## slow!l setwd("./data/output/fitmodel") load(file = file.choose()) setwd("../../../")
Regression prediction using simulated LA populations takes the model fits from riskfactor_regn
# source("./classpredict.R") # temp <- classPredict(fit.model, drink0=FALSE) setwd("./data/output/predictions") load(file = file.choose()) setwd("../../../")
Compare the estimated coverage from the classifiers against the observed coverages
# source("PLOTS_estimate_vs_data.R") # source("MAPS_estimate_vs_data.R")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.