]> code.communitydata.science - ml_measurement_error_public.git/blobdiff - simulations/plot_irr_dv_example.R
git-annex in nathante@n3246:/gscratch/comdata/users/nathante/ml_measurement_error_public
[ml_measurement_error_public.git] / simulations / plot_irr_dv_example.R
index f5e2c419826dae76e40e73f07ef5840cf9cbba7a..46450d59a4e288dc2405be2b713f854ab3b8c074 100644 (file)
@@ -17,6 +17,10 @@ build_plot_dataset <- function(df){
 
     z.true <-  summarize.estimator(df, 'true','z')
 
+    x.naive <-  summarize.estimator(df, 'naive','x')
+
+    z.naive <-  summarize.estimator(df, 'naive','z')
+
     x.loa0.feasible <- summarize.estimator(df, 'loa0.feasible','x')
     
     z.loa0.feasible <- summarize.estimator(df,'loa0.feasible','z')
@@ -34,8 +38,14 @@ build_plot_dataset <- function(df){
     z.loco.mle <- summarize.estimator(df, 'loco.mle', 'z')
 
 
+    z.loco.amelia <- summarize.estimator(df, 'amelia.full', 'z')
+    x.loco.amelia <- summarize.estimator(df, 'amelia.full', 'x')
+
+    z.loco.zhang <- summarize.estimator(df, 'zhang', 'z')
+    x.loco.zhang <- summarize.estimator(df, 'zhang', 'x')
+
     accuracy <- df[,mean(accuracy)]
-    plot.df <- rbindlist(list(x.true,z.true,x.loa0.feasible,z.loa0.feasible,x.loa0.mle,z.loa0.mle,x.loco.feasible, z.loco.feasible, z.loco.mle, x.loco.mle),use.names=T)
+    plot.df <- rbindlist(list(x.true,z.true,x.loa0.feasible,z.loa0.feasible,x.naive,z.naive,x.loa0.mle,z.loa0.mle,x.loco.feasible, z.loco.feasible, z.loco.mle, x.loco.mle, x.loco.amelia, z.loco.amelia, z.loco.zhang, x.loco.zhang),use.names=T)
     plot.df[,accuracy := accuracy]
     plot.df <- plot.df[,":="(sd.est=sqrt(var.est)/N.sims)]
     return(plot.df)

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