- result <- append(result, list(Bxy.est.loco.mle=coef['x'],
- Bzy.est.loco.mle=coef['z'],
- Bxy.ci.upper.loco.mle = ci.upper['x'],
- Bxy.ci.lower.loco.mle = ci.lower['x'],
- Bzy.ci.upper.loco.mle = ci.upper['z'],
- Bzy.ci.lower.loco.mle = ci.lower['z']))
+ result <- append(result, list(Bxy.est.triple.proxy=coef['x'],
+ Bzy.est.triple.proxy=coef['z'],
+ Bxy.ci.upper.triple.proxy = ci.upper['x'],
+ Bxy.ci.lower.triple.proxy = ci.lower['x'],
+ Bzy.ci.upper.triple.proxy = ci.upper['z'],
+ Bzy.ci.lower.triple.proxy = ci.lower['z']))
+
+ ## df.loco.mle <- copy(df)
+ ## df.loco.mle[,y.obs:=NA]
+ ## df.loco.mle[(y.obs.0)==(y.obs.1),y.obs:=y.obs.0]
+ ## df.loco.mle[,y.true:=y]
+ ## df.loco.mle[,y:=y.obs]
+ ## print(df.loco.mle[!is.na(y.obs.1),mean(y.true==y,na.rm=TRUE)])
+ ## loco.mle <- measerr_mle_dv(df.loco.mle, outcome_formula=outcome_formula, proxy_formula=proxy_formula)
+ ## fisher.info <- solve(loco.mle$hessian)
+ ## coef <- loco.mle$par
+ ## ci.upper <- coef + sqrt(diag(fisher.info)) * 1.96
+ ## ci.lower <- coef - sqrt(diag(fisher.info)) * 1.96
+
+ ## result <- append(result, list(Bxy.est.loco.mle=coef['x'],
+ ## Bzy.est.loco.mle=coef['z'],
+ ## Bxy.ci.upper.loco.mle = ci.upper['x'],
+ ## Bxy.ci.lower.loco.mle = ci.lower['x'],
+ ## Bzy.ci.upper.loco.mle = ci.upper['z'],
+ ## Bzy.ci.lower.loco.mle = ci.lower['z']))
+
+