OMD | R Documentation |

Optimal follow-up experiments to discriminate between competing models. The extra-runs are derived from the maximization of the objective model discrimination criterion represented by a weighted average of Kullback-Leibler divergences between all possible pairs of rival models

```
OMD(OBsProb, nFac, nBlk = 0, nMod, nFoll, Xcand, mIter, nStart, startDes, top = 20)
```

`OBsProb` |
list. |

`nFac` |
integer. Number of factors in the initial experiment. |

`nBlk` |
integer >=0. Number of blocking factors in the initial experiment.
They are accommodated in the first columns of matrix |

`nMod` |
integer. Number of competing models considered to compute |

`nFoll` |
integer. Number of additional runs in the follow-up experiment. |

`Xcand` |
matrix. Matrix [ |

`mIter` |
integer >=0. Maximum number of iterations in the exchange algorithm.
If |

`nStart` |
integer. Number of different designs of dimension |

`startDes` |
matrix. Input matrix [ |

`top` |
integer. Number of highest OMD follow-up designs recorded. |

The OMD criterion, proposed by Consonni and Deldossi, is used to discriminate
among competing models. Random starting runs chosen from `Xcand`

are used
for the Wynn search of best OMD follow-up designs. `nStart`

starting points are
tried in the search limited to `mIter`

iterations. If `mIter=0`

then
`startDes`

user-provided designs are used. Posterior probabilities and residual
variances of the competing models are obtained from `OBsProb`

.
The function calls the FORTRAN subroutine ‘omd’ and captures
summary results. The complete output of the FORTRAN code is save in
the ‘MDPrint.out’ file in the working directory.

Below a list with all input and output parameters of the FORTRAN
subroutine `OMD`

. Most of the variable names kept to match FORTRAN code.

`NSTART` |
integer. Number of different designs of dimension |

`NRUNS` |
integer. Number |

`ITMAX` |
integer. Maximum number |

`INITDES` |
integer. Indicator variable. If |

`N0` |
integer. Numbers of runs |

`X` |
matrix. Matrix from initial experiment ( |

`Y` |
double. Response values from initial experiment ( |

`BL` |
integer >=0. The number of blocking factors in the initial experiment.
They are accommodated in the first columns of matrix |

`COLS` |
integer. Number of factors |

`N` |
integer. Number of candidate runs |

`Xcand` |
matrix. Matrix [ |

`NM` |
integer. Number of competing models |

`P` |
double. Models posterior probability |

`SIGMA2` |
double. Competing models residual variances |

`NF` |
integer. Number of main factors in each competing models |

`MNF` |
integer. Maximum number of factor in models ( |

`JFAC` |
matrix. Matrix |

`CUT` |
integer. Maximum order of the interaction among factors in the models |

`MBEST` |
matrix. If |

`NTOP` |
integer. Number of the top best OMD designs |

`TOPD` |
double. The OMD value for the best top |

`TOPDES` |
matrix. Top |

`flag` |
integer. Indicator = 1, if the ‘md’ subroutine finished properly, -1 otherwise. |

The function is a wrapper to call the modified FORTAN subroutine ‘omd’, ‘OMD.f’, part of the mdopt bundle for Bayesian model discrimination of multifactor experiments.

Laura Deldossi. Adapted for **R** by Marta Nai Ruscone.

Box, G. E. P. and Meyer, R. D. (1993)
Finding the Active Factors in Fractionated Screening Experiments.,
*Journal of Quality Technology* **25**(2), 94–105.
\Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/00224065.1993.11979432")}.

Consonni, G. and Deldossi, L. (2016)
Objective Bayesian Model Discrimination in Follow-up design.,
*Test* **25**(3), 397–412.
\Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s11749-015-0461-3")}.

Meyer, R. D., Steinberg, D. M. and Box, G. E. P. (1996)
Follow-Up Designs to Resolve Confounding in Multifactor Experiments (with discussion).,
*Technometrics* **38**(4), 303–332.
\Sexpr[results=rd]{tools:::Rd_expr_doi("10.2307/1271297")}.

`print.OMD`

, `OBsProb`

```
library(OBsMD)
data(OBsMD.es5, package="OBsMD")
X <- as.matrix(OBsMD.es5[,1:5])
y <- OBsMD.es5[,6]
es5.OBsProb <- OBsProb(X=X,y=y,blk=0,mFac=5,mInt=2,nTop=32)
nMod <- 26
Xcand <- matrix(c(-1, -1, -1, -1, -1,
1, -1, -1, -1, -1,
-1, 1, -1, -1, -1,
1, 1, -1, -1, -1,
-1, -1, 1, -1, -1,
1, -1, 1, -1, -1,
-1, 1, 1, -1, -1,
1, 1, 1, -1, -1,
-1, -1, -1, 1, -1,
1, -1, -1, 1, -1,
-1, 1, -1, 1, -1,
1, 1, -1, 1, -1,
-1, -1, 1, 1, -1,
1, -1, 1, 1, -1,
-1, 1, 1, 1, -1,
1, 1, 1, 1, -1,
-1, -1, -1, -1, 1,
1, -1, -1, -1, 1,
-1, 1, -1, -1, 1,
1, 1, -1, -1, 1,
-1, -1, 1, -1, 1,
1, -1, 1, -1, 1,
-1, 1, 1, -1, 1,
1, 1, 1, -1, 1,
-1, -1, -1, 1, 1,
1, -1, -1, 1, 1,
-1, 1, -1, 1, 1,
1, 1, -1, 1, 1,
-1, -1, 1, 1, 1,
1, -1, 1, 1, 1,
-1, 1, 1, 1, 1,
1, 1, 1, 1, 1
),nrow=32,ncol=5,dimnames=list(1:32,c("A","B","C","D","E")),byrow=TRUE)
p_omd <- OMD(OBsProb=es5.OBsProb,nFac=5,nBlk=0,nMod=26,nFoll=4,Xcand=Xcand,
mIter=20,nStart=25,startDes=NULL,top=30)
print(p_omd)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.