1
0

revisions and appendix update

This commit is contained in:
2023-02-24 15:10:00 -08:00
parent c5e0a01713
commit 3dc090ec6a
18 changed files with 254 additions and 438 deletions

View File

@@ -39,7 +39,7 @@ plot.simulation <- function(plot.df, iv='x', levels=c("true","naive", "amelia.fu
p <- p + geom_hline(aes(yintercept=true.est),linetype=2)
p <- p + geom_pointrange(shape=1,size=0.5)
p <- p + geom_linerange(aes(ymax=mean.ci.upper, ymin=mean.ci.lower),position=position_nudge(x=0.4), color='grey40')
p <- p + geom_linerange(aes(ymax=median.ci.upper, ymin=median.ci.lower),position=position_nudge(x=0.4), color='grey40')
return(p)
}
@@ -48,10 +48,10 @@ plot.simulation <- function(plot.df, iv='x', levels=c("true","naive", "amelia.fu
plot.simulation.iv <- function(plot.df, iv='x'){
plot.df <- plot.df[(N!=8000) & (m!=800) & (m!=200)]
new.levels <- c("true"="True","naive"="Naïve","amelia.full"="MI", "mecor"="mecor","gmm"="GMM", "mle"="MLE", "zhang"="PL","feasible"="Feasible")
new.levels <- c("true"="True","naive"="Naïve","amelia.full"="MI", "mecor"="mecor","gmm"="GMM", "mle"="MLA", "zhang"="PL","feasible"="Feasible")
plot.df[,method := new.levels[method]]
return(plot.simulation(plot.df, iv, levels=c("True","Naïve","MI", "GMM", "MLE", "PL", "Feasible")))
return(plot.simulation(plot.df, iv, levels=c("True","Naïve","MI", "GMM", "MLA", "PL", "Feasible")))
}
@@ -59,10 +59,10 @@ plot.simulation.dv <- function(plot.df, iv='x'){
plot.df <- copy(plot.df)
plot.df <- plot.df[(N!=8000) & (m!=800) & (m!=200)]
new.levels <- c("true"="True","naive"="Naïve","amelia.full"="MI", "mecor"="mecor","gmm"="GMM", "mle"="MLE", "zhang"="PL","feasible"="Feasible")
new.levels <- c("true"="True","naive"="Naïve","amelia.full"="MI", "mecor"="mecor","gmm"="GMM", "mle"="MLA", "zhang"="PL","feasible"="Feasible")
plot.df[,method:=new.levels[method]]
return(plot.simulation(plot.df, iv, levels=c("True","Naïve", "MI","MLE","PL","Feasible")))
return(plot.simulation(plot.df, iv, levels=c("True","Naïve", "MI","MLA","PL","Feasible")))
}
plot.simulation.irr <- function(plot.df,iv='x'){