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_2.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)
z.amelia.full <- summarize.estimator(df, 'amelia.full', 'z')
- x.mecor <- summarize.estimator(df, 'mecor', 'x')
+ ## x.mecor <- summarize.estimator(df, 'mecor', 'x')
- z.mecor <- summarize.estimator(df, 'mecor', 'z')
+ ## z.mecor <- summarize.estimator(df, 'mecor', 'z')
- x.mecor <- summarize.estimator(df, 'mecor', 'x')
+ ## x.mecor <- summarize.estimator(df, 'mecor', 'x')
- z.mecor <- summarize.estimator(df, 'mecor', 'z')
+ ## z.mecor <- summarize.estimator(df, 'mecor', 'z')
x.mle <- summarize.estimator(df, 'mle', 'x')
z.gmm <- summarize.estimator(df, 'gmm', 'z')
accuracy <- df[,mean(accuracy)]
- plot.df <- rbindlist(list(x.true,z.true,x.naive,z.naive,x.amelia.full,z.amelia.full,x.mecor, z.mecor, x.gmm, z.gmm, x.feasible, z.feasible,z.mle, x.mle, x.zhang, z.zhang, x.gmm, z.gmm),use.names=T)
+ plot.df <- rbindlist(list(x.true,z.true,x.naive,z.naive,x.amelia.full,z.amelia.full,x.gmm, z.gmm, x.feasible, z.feasible,z.mle, x.mle, x.zhang, z.zhang, x.gmm, z.gmm),use.names=T)
plot.df[,accuracy := accuracy]
plot.df <- plot.df[,":="(sd.est=sqrt(var.est)/N.sims)]
return(plot.df)
sims.df <- read_feather(args$infile)
+unique(sims.df[,.N,by=.(N,m)])
print(unique(sims.df$N))
# df <- df[apply(df,1,function(x) !any(is.na(x)))]