Skip to content

samuelweisenthal/relative_sparsity

Repository files navigation

This is a readme for research code for the manuscript Relative Sparsity for Medical Decision Making
Note that run.mc.R can be run locally or on a server, and that defaults here at set to server
Note that there is a pdf that contains some preliminary data analysis for the real data, which was generated by an rmarkdown file
Note that all file paths have been anonymized - so eg author names have been replaced with "anonymousAuthor"

Files (alphabetically):

analyze.sel.R 
	analyzes  Monte-Carlo results

center.scale.R
	scales data. Option to center, not used

is.R
	importance sampling (inverse probability weighting) functions

mc.utils.R
	various helper functions for running Monte-Carlo experiments

mcop
	This will just contain some intermediary results, in case it is useful to look back at them. Not really useful
	The main experiment results will be in a directory that is generated automatically by run.mc.R

mimic.R
	Runs real data analysis modeling. Copied when run to save configurations

mimic.prelim.analysis.Rmd
	Runs preliminary analysis for real data
mimic.prelim.analysis.pdf
	Preliminary analysis

run.mc.R
	Runs Monte-Carlo experiment. Copied when run to save configurations, and put in result directory
Example_MC_ExperimentRes.Dir.n=22M=5plotsM=2K=2maxLam=2.00e+01minLam=1.00e-03usediff=0.001tau2=2
	Just an example of a result directory generated by run.mc.R
	contents:
		logs
			empty because writes to stdout in local machine setting, but if on server (bh=1) logs will have the stdout
		masks.matrix 
			object with all selections over MC datasets
		ors.av 
			average coefficients, vn, etc over MC datasets.  Is a list, which can be read and reprocessed eg for changing plots
		paramsel
			list with parameters for each MC dataset. ie seed, b0, etc.
		plots	
			the main figure in the mansucript, lambda vs coefficients
		res.sel
			r objects for each individual MC dataset result
		unique.masks
			list of unique selections
		
run.one.select.R
	Runs one selection

sim.R
	Simulates (generates) data

tag=mimicusediff=0.5,start.t3endStage3gammaselix=2minlam=1e-05maxlam=2000ncov=9use.dff=0.5.mimic.txt
tag=mimicusediff=0.5,start.t3endStage3gammaselix=2minlam=1e-05maxlam=2000ncov=9use.dff=0.5resmimic.outer.resop
	These are just output files generated by mimic.R. Similar output files for Monte-Carlo are generated by run.mc.R and put in that results directory

utils.R
	more general helper functions

data_clean.py
	From Futoma 2020 paper. Creates episodes by processing csv files made by bash scripts in https://github.com/dtak/POPCORN-POMDP
np_load.py
	Processes episodes created by data_clean.py so that they are in a form easily read by R. They will then be processed by mimic.R

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published