# NOT RUN {
## --- Continuing the Example from '?sim.mp':
# 5*6 and 4*5 matrix
set.seed(9128)
sa1a<-sim.mp(par=c(-7,0.1), n.row=c(5,4), n.col=c(6,5),
sens=0.95, spec=0.95)
sa1<-sa1a$dframe
# }
# NOT RUN {
fit1 <- gtreg.mp(formula = cbind(col.resp, row.resp) ~ x, data = sa1,
coln = coln, rown = rown, arrayn = arrayn,
sens = 0.95, spec = 0.95, tol = 0.005, n.gibbs = 2000, trace = TRUE)
fit1
summary(fit1)
# }
# NOT RUN {
## Here is an example of how long this fitting process may take. For the
## following simulated data, it takes a computer with 2.2GHZ processor and
## 3GB RAM about 6 minutes to achieve convergence.
set.seed(9012)
sa2a<-sim.mp(par=c(-7,0.1), n.row=c(10,10,10,10), n.col=c(10,10,10,10),
sens=0.95, spec=0.95)
sa2<-sa2a$dframe
# }
# NOT RUN {
fit2 <- gtreg.mp(formula = cbind(col.resp, row.resp) ~ x, data = sa2,
coln = coln, rown = rown, arrayn = arrayn, retest = retest,
sens = 0.95, spec = 0.95, start = c(-7, 0.1), tol = 0.005)
fit2
summary(fit2)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab