]> code.communitydata.science - ml_measurement_error_public.git/blobdiff - simulations/plot_dv_example.R
check in some old simulation updates and a dv examples with real data
[ml_measurement_error_public.git] / simulations / plot_dv_example.R
index 71963b1f67cf2cfca3afb92db49f757a7005099f..45a5d51827cf2cda733c48ddbd63876bc305feaf 100644 (file)
@@ -6,7 +6,7 @@ library(filelock)
 library(argparser)
 
 parser <- arg_parser("Simulate data and fit corrected models.")
-parser <- add_argument(parser, "--infile", default="", help="name of the file to read.")
+parser <- add_argument(parser, "--infile", default="example_4.feather", help="name of the file to read.")
 parser <- add_argument(parser, "--remember-file", default="remembr.RDS", help="name of the remember file.")
 parser <- add_argument(parser, "--name", default="", help="The name to safe the data to in the remember file.")
 args <- parse_args(parser)
@@ -87,6 +87,7 @@ build_plot_dataset <- function(df){
 change.remember.file(args$remember_file, clear=TRUE)
 sims.df <- read_feather(args$infile)
 sims.df[,Bzx:=NA]
+sims.df[,y_explained_variance:=NA]
 sims.df[,accuracy_imbalance_difference:=NA]
 plot.df <- build_plot_dataset(sims.df)
 
@@ -97,6 +98,7 @@ set.remember.prefix(gsub("plot.df.","",args$name))
 remember(median(sims.df$cor.xz),'med.cor.xz')
 remember(median(sims.df$accuracy),'med.accuracy')
 remember(median(sims.df$error.cor.x),'med.error.cor.x')
+remember(median(sims.df$error.cor.z),'med.error.cor.z')
 remember(median(sims.df$lik.ratio),'med.lik.ratio')
 
 

Community Data Science Collective || Want to submit a patch?