renamed file to reflect data_extraction_mediator
This commit is contained in:
parent
52a2453327
commit
3a380a5be1
11 changed files with 95 additions and 1963 deletions
|
@ -6,18 +6,28 @@ getwd()
|
|||
# TASK: Extract relevant columns from mosaic fp adults data for regression
|
||||
# clinical and sig meds
|
||||
########################################################################
|
||||
|
||||
|
||||
########################################################################
|
||||
clinical_cols_data = c("mosaic"
|
||||
, "ia_exac_copd"
|
||||
, "death"
|
||||
#, "obese2" #inc peaeds, but once you subset data for adults, its the same!
|
||||
, "obesity"
|
||||
, "flustat"
|
||||
# meta data columns
|
||||
meta_data_cols = c("mosaic"
|
||||
, "gender"
|
||||
, "age"
|
||||
, "adult"
|
||||
, "flustat"
|
||||
, "type"
|
||||
#, "obese2" #inc peaeds, but once you subset data for adults, its the same!
|
||||
#, "height", "height_unit"
|
||||
#, "weight", "weight_unit"
|
||||
#, "ia_height_ftin", "ia_height_m", "ia_weight"
|
||||
#, "visual_est_bmi", "bmi_rating"
|
||||
, "obesity")
|
||||
|
||||
clinical_cols = c("death"
|
||||
, "sfluv"
|
||||
, "h1n1v"
|
||||
, "age"
|
||||
, "gender"
|
||||
, "ia_exac_copd"
|
||||
, "onset_2_t1"
|
||||
, "asthma"
|
||||
, "vl_pfu_ul_npa1"
|
||||
, "los"
|
||||
|
@ -36,13 +46,13 @@ clinical_cols_data = c("mosaic"
|
|||
, "inresp_sev"
|
||||
, "steroid")
|
||||
|
||||
clinical_cols_added = c("age_bins"
|
||||
, "o2_sat_bin"
|
||||
, "onset_initial_bin"
|
||||
, "steroid_ics"
|
||||
, "t1_resp_recoded" )
|
||||
#clinical_cols_added = c("age_bins"
|
||||
# , "o2_sat_bin"
|
||||
# , "onset_initial_bin"
|
||||
# , "steroid_ics"
|
||||
# , "t1_resp_recoded")
|
||||
|
||||
clinical_cols = c(clinical_cols_data, clinical_cols_added)
|
||||
meta_clinical_cols = c(meta_data_cols, clinical_cols)
|
||||
|
||||
sig_npa_cols = c("eotaxin_npa1"
|
||||
, "eotaxin3_npa1"
|
||||
|
@ -83,15 +93,15 @@ sig_npa_cols = c("eotaxin_npa1"
|
|||
, "tnfr2_npa2"
|
||||
, "tnfr2_npa3")
|
||||
|
||||
cols_to_extract = c(clinical_cols, sig_npa_cols)
|
||||
#cols_to_extract = c(clinical_cols, sig_npa_cols, clinical_cols_added)
|
||||
|
||||
if ( length(cols_to_extract) == length(clinical_cols) + length(sig_npa_cols) ){
|
||||
cat("PASS: length match"
|
||||
, "\nTotal no. of cols to extract for regression:", length(cols_to_extract)
|
||||
, "\nNo. of clinical cols:", length(clinical_cols)
|
||||
, "\nNo. of sig npa cols: ", length(sig_npa_cols))
|
||||
}else{
|
||||
cat("FAIL: length mismatch"
|
||||
, "\nAborting!")
|
||||
quit()
|
||||
}
|
||||
#if ( length(cols_to_extract) == length(clinical_cols) + length(sig_npa_cols) + length(clinical_cols_added) ){
|
||||
# cat("PASS: length match"
|
||||
# , "\nTotal no. of cols to extract for regression:", length(cols_to_extract)
|
||||
# , "\nNo. of clinical cols:", length(clinical_cols)
|
||||
# , "\nNo. of sig npa cols: ", length(sig_npa_cols))
|
||||
#}else{
|
||||
# cat("FAIL: length mismatch"
|
||||
# , "\nAborting!")
|
||||
# quit()
|
||||
#}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue