Result is in the last few lines. The other lines are from the output of the program. This file is included for completeness but offers no more info than the tables in the paper. > ### Create Rows for GEE simulations corresponding to Mancl and DeRouen's method ### First run 3 programs: sim.pois.exchange.fix.ssc, sim.pois.indep.nofix.ssc, sim.preisser.ssc row1 <- rep(NA, 8) > nsim <- 1000 ### GEE Pois, Exchangeable, tau=0 > source("out.sim.pois.exchange.fix") ### creates list called out, with results from pois exchange simulations > ftest.md <- function(beta, Vmd, K, p, alpha = 0.05) { ### create pvalues first x <- 1 - pf((beta^2)/Vmd, 1, K - p) prop.le.alpha <- length(x[x <= alpha])/length(x) prop.le.alpha } > mean.ci.length.md <- function(Vmd, K, p, alpha = 0.05) { ci.length <- 2 * sqrt(qf(1 - alpha, 1, K - p)) * sqrt(Vmd) mean(ci.length) } ### GEE Pois, Exchangeable, tau=0 > index <- rep(T, nsim) > if(!is.null(out$erri.d1)) index[out$erri.d1] <- F ###number of converging simulated data sets [1] F > length(out$bd1[index]) [1] 991 > row1[1] <- ftest.md(out$bd1[index], out$vd1[index, 3], 20, 2) > row1[2] <- mean.ci.length.md(out$vd1[index, 3], 20, 2) ### GEE Pois, Exchangeable, tau=1/2 > index <- rep(T, nsim) > if(!is.null(out$erri.d4)) index[out$erri.d4] <- F ###number of converging simulated data sets NULL > length(out$bd4[index]) [1] 1000 > row1[3] <- ftest.md(out$bd4[index], out$vd4[index, 3], 20, 2) > row1[4] <- mean.ci.length.md(out$vd4[index, 3], 20, 2) ### GEE Pois, Independent, tau=0 > source("out.sim.pois.indep.nofix") > out <- out.sim.pois.indep.nofix > index <- rep(T, nsim) > if(!is.null(out$erri.d1)) index[out$erri.d1] <- F ###number of converging simulated data sets NULL > length(out$bd1[index]) [1] 1000 > row1[5] <- ftest.md(out$bd1[index], out$vd1[index, 3], 20, 2) > row1[6] <- mean.ci.length.md(out$vd1[index, 3], 20, 2) ### GEE Pois, Independent, tau=1/2 > index <- rep(T, nsim) > if(!is.null(out$erri.d4)) index[out$erri.d4] <- F ###number of converging simulated data sets NULL > length(out$bd4[index]) [1] 1000 > row1[7] <- ftest.md(out$bd4[index], out$vd4[index, 3], 20, 2) > row1[8] <- mean.ci.length.md(out$vd4[index, 3], 20, 2) ### Preisser data (GUIDE data) simulation results > row2 <- rep(NA, 10) > source("out.sim.preisser") > out <- out.sim.preisser > index <- rep(T, nsim) > if(!is.null(out$erri2)) index[out$erri2] <- F ###number of converging simulated data sets NULL > length(out$b2[index]) [1] 1000 > row2[1] <- ftest.md(out$b2[index], out$v2[index, 3], 38, 6) > row2[2] <- mean.ci.length.md(out$v2[index, 3], 38, 6) > index <- rep(T, nsim) > if(!is.null(out$erri3)) index[out$erri3] <- F ###number of converging simulated data sets NULL > length(out$b3[index]) [1] 1000 > row2[3] <- ftest.md(out$b3[index], out$v3[index, 3], 38, 6) > row2[4] <- mean.ci.length.md(out$v3[index, 3], 38, 6) > index <- rep(T, nsim) > if(!is.null(out$erri4)) index[out$erri4] <- F ###number of converging simulated data sets NULL > length(out$b4[index]) [1] 1000 > row2[5] <- ftest.md(out$b4[index], out$v4[index, 3], 38, 6) > row2[6] <- mean.ci.length.md(out$v4[index, 3], 38, 6) > index <- rep(T, nsim) > if(!is.null(out$erri5)) index[out$erri5] <- F ###number of converging simulated data sets NULL > length(out$b5[index]) [1] 1000 > row2[7] <- ftest.md(out$b5[index], out$v5[index, 3], 38, 6) > row2[8] <- mean.ci.length.md(out$v5[index, 3], 38, 6) > index <- rep(T, nsim) > if(!is.null(out$erri6)) index[out$erri6] <- F ###number of converging simulated data sets NULL > length(out$b6[index]) [1] 1000 > row2[9] <- ftest.md(out$b6[index], out$v6[index, 3], 38, 6) > row2[10] <- mean.ci.length.md(out$v6[index, 3], 38, 6) > round(row1, digits = 3) [1] 0.041 0.098 0.047 0.501 0.043 0.066 0.041 0.258 > round(row2, digits = 3) [1] 0.042 2.874 0.039 2.634 0.040 0.289 0.033 1.559 0.042 0.408