[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ Skip to main content
Log in

Optimal designs for nonlinear mixed-effects models using competitive swarm optimizer with mutated agents

  • Original Paper
  • Published:
Statistics and Computing Aims and scope Submit manuscript

Abstract

Nature-inspired meta-heuristic algorithms are increasingly used in many disciplines to tackle challenging optimization problems. Our focus is to apply a newly proposed nature-inspired meta-heuristics algorithm called CSO-MA to solve challenging design problems in biosciences and demonstrate its flexibility to find various types of optimal approximate or exact designs for nonlinear mixed models with one or several interacting factors and with or without random effects. We show that CSO-MA is efficient and can frequently outperform other algorithms either in terms of speed or accuracy. The algorithm, like other meta-heuristic algorithms, is free of technical assumptions and flexible in that it can incorporate cost structure or multiple user-specified constraints, such as, a fixed number of measurements per subject in a longitudinal study. When possible, we confirm some of the CSO-MA generated designs are optimal with theory by developing theory-based innovative plots. Our applications include searching optimal designs to estimate (i) parameters in mixed nonlinear models with correlated random effects, (ii) a function of parameters for a count model in a dose combination study, and (iii) parameters in a HIV dynamic model. In each case, we show the advantages of using a meta-heuristic approach to solve the optimization problem, and the added benefits of the generated designs.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
£29.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price includes VAT (United Kingdom)

Instant access to the full article PDF.

Fig. 1
Fig. 2

Similar content being viewed by others

Explore related subjects

Discover the latest articles, news and stories from top researchers in related subjects.

References

  • Berger, M.P.F., Wong, W.K.: An introduction to optimal designs for social and biomedical research. Wiley, Amsterdam (2009)

    Google Scholar 

  • Blum, C., Raidl, G.R.: Hybrid metaheuristics: powerful tools for optimization. Springer, New York (2016)

    Google Scholar 

  • Blum, C., Puchinger, J., Raidl, G.R., Roli, A.: Hybrid metaheuristics in combinatorial optimization: a survey. Appl. Soft Comput. 11, 4135–4151 (2011)

    Google Scholar 

  • Breslow, N.E., Clayton, D.G.: Approximate inference in generalized linear mixed models. J. Am. Stat. Assoc. 88(421), 9–25 (1993)

    Google Scholar 

  • Chen, P.-Y., Chen, R.-B., Tung, H.-C., Wong, W.K.: Standardized maximim D-optimal designs for enzyme kinetic inhibition models. Chemom. Intell. Lab. Syst. 169, 79–86 (2017)

    Google Scholar 

  • Cheng, R., Jin, Y.: A competitive swarm optimizer for large scale optimization. IEEE Trans. Cybern. 45(2), 191–204 (2015)

    Google Scholar 

  • Cui, E.H., Song, D., Wong, W.K., Li, J.J.: Single-cell generalized trend model (scGTM): a flexible and interpretable model of gene expression trend along cell pseudotime. Bioinformatics 38, 3927 (2022)

    Google Scholar 

  • Dobson, A.J., Barnett, A.G.: An introduction to generalized linear models. Chapman & Hall, London (2018)

    Google Scholar 

  • Du, Y.: Optimal allocation in regression models with cost consideration. J. Phys. Conf. Ser. 1592, 012033 (2020). https://doi.org/10.1088/1742-6596/1592/1/012033

    Article  Google Scholar 

  • Dumont, C., Lestini, G., Nagard, H.L., Mentré, F., Comets, E., Nguyen, T.T., et al.: PFIM 4.0, an extended R program for design evaluation and optimization in nonlinear mixed-effect models. Comput. Methods Programs Biomed. 156, 217–229 (2018)

    Google Scholar 

  • Ezugwu, A.E., Shukla, A.K., Nath, R.: Metaheuristics: a comprehensive overview and classification along with bibliometric analysis. Artif. Intell. Rev. 54, 4237–4316 (2021)

    Google Scholar 

  • Fu, L., Ma, F., Yu, Z., Zhu, Z.: Multiplication algorithms for approximate optimal distributions with cost constraints. Mathematics 11(8), 1963 (2023)

    Google Scholar 

  • Grossi, E.: Do artificial neural networks love sex? How the combination of artificial neural networks with evolutionary algorithms may help to identify gender influences in rheumatic diseases. Clin. Exp. Rheumatol. 41, 1–5 (2023)

    Google Scholar 

  • Gu, S., Cheng, R., Jin, Y.: Feature selection for high-dimensional classification using a competitive swarm optimizer. Soft Comput. 22(3), 811–822 (2018)

    Google Scholar 

  • Gupta, A.K., Nagar, D.K.: Matrix variate distributions. Chapman and Hall/CRC, London (2018)

    Google Scholar 

  • Haidar, A., Field, M., Sykes, J., Carolan, M., Holloway, L.: PSPSO: a package for parameters selection using particle swarm optimization. SoftwareX 15, 100706 (2021)

  • Han, C., Chaloner, K.: Bayesian experimental design for nonlinear mixed-effects models with application to HIV dynamics. Biometrics 60(1), 25–33 (2004)

    MathSciNet  Google Scholar 

  • Han, C., Chaloner, K., Perelson, A.S.: Bayesian analysis of a population HIV dynamic model, pp. 223–237. Springer, New York (2002)

    Google Scholar 

  • Hassan, S.A., Agrawal, P., Ganesh, T., Mohamed, A.W.: Optimum scheduling of the disinfection process for COVID-19 in public places with a case study from Egypt, a novel discrete binary gaining-sharing knowledge-based metaheuristic algorithm. In: Artificial Intelligence for COVID-19, vol. 358, pp. 215–228. Springer, New York (2021)

    Google Scholar 

  • Healy, B.C., Ikle, D., Macklin, E.A., Cutter, G.: Optimal design and analysis of phase I/II clinical trials in multiple sclerosis with gadolinium-enhanced lesions as the endpoint. Mult. Scler. J. 16, 840–847 (2010)

    Google Scholar 

  • Heaton, J.: Artificial intelligence for humans volume 2: Nature-inspired algorithms. Heaton Researcher Inc, Chesterfield (2019)

    Google Scholar 

  • Hesami, M., Maxwell, A., Jones, P.: Application of artificial intelligence models and optimization algorithms in plant cell and tissue culture. Appl. Microbiol. Biotechnol. 104, 9449–9485 (2020)

    Google Scholar 

  • Jang, W., Lim, J.: A numerical study of PQL estimation biases in generalized linear mixed models under heterogeneity of random effects. Commun. Stat. Simul. Comput. 38(4), 692–702 (2009)

    MathSciNet  Google Scholar 

  • Jiang, H.-Y., Yue, R.-X.: Pseudo-Bayesian D-optimal designs for longitudinal Poisson mixed models with correlated errors. Comput. Stat. 34(1), 71–87 (2019)

    MathSciNet  Google Scholar 

  • Kashif, H., Mohd, S., Shi, C., Yuhui, S.: Metaheuristic research: a comprehensive survey. Artif. Intell. Rev. 52(52), 2191–2233 (2019)

    Google Scholar 

  • Khan, A.Z., Khalid, A., Javaid, N., Haseeb, A., Saba, T., Shafiq, M.: Exploiting nature-inspired-based artificial intelligence techniques for coordinated day-ahead scheduling to efficiently manage energy in smart grid. IEEE Access 18(Article ID 425853), 140102–140125 (2019)

    Google Scholar 

  • Kiefer, J.: General equivalence theory for optimum design (approximate theory). Ann. Stat. 2, 849–879 (1974)

    MathSciNet  Google Scholar 

  • Korani, W., Mouhoub, M.: Review on nature-inspired algorithms. Oper. Res. Forum (2021). https://doi.org/10.1007/s43069-021-00068-x

  • Kumar, S., Nayyar, A., Paul, A. (eds.): Swarm intelligence and evolutionary algorithms in healthcare and drug development. Chapman & Hall, London (2020)

    Google Scholar 

  • Lawless, J.F.: Negative binomial and mixed Poisson regression. Can. J. Stat. 15, 209–225 (1987)

    MathSciNet  Google Scholar 

  • Li, Y., Wei, Y., Chu, Y.: Research on solving systems of nonlinear equations based on improved PSO. Math. Probl. Eng. 2015, 1–10 (2015)

    Google Scholar 

  • Long, J., Ryoo, J.: Using fractional polynomials to model non-linear trends in longitudinal data. Br. J. Math. Stat. Psychol. 63(1), 177–203 (2010)

    MathSciNet  Google Scholar 

  • Lukemire, J., Mandal, A., Wong, W.K.: d-QPSO: a quantum-behaved particle swarm technique for finding D-optimal designs with discrete and continuous factors and a binary response. Technometrics 61(1), 71–87 (2018)

    MathSciNet  Google Scholar 

  • Mendes, J.M., Oliveira, P.M., Santos, F.M., Santos, R.M.: Nature-inspired metaheuristics and their applications to agriculture: a short review. In: Oliveira, P.M. Novais, P. and Reis, l.P. (eds) EPIA conference on artificial intelligence: Epia 2019 Progress in artificial intelligence, pp. 167–179 (2019)

  • Miranda, L.J.: Pyswarms: a research toolkit for particle swarm optimization in python. J. Open Sour. Softw. 3(21), 433 (2018)

    Google Scholar 

  • Mohapatra, P., Das, K.N., Roy, S.: A modified competitive swarm optimizer for large scale optimization problems. Appl. Soft Comput. 59, 340–362 (2017)

    Google Scholar 

  • Nowak, M., May, R.M.: Virus dynamics: mathematical principles of immunology and virology: mathematical principles of immunology and virology. Oxford University Press, Oxford (2000)

    Google Scholar 

  • Pázman, A.: Foundations of optimum experimental design, vol. 14. Springer, New York (1986)

    Google Scholar 

  • Pazman, A., Pronzato, L., et al.: Optimum design accounting for the global nonlinear behavior of the model. Ann. Stat. 42(4), 1426–1451 (2014)

    MathSciNet  Google Scholar 

  • Piotrowski, A.P., Piotrowska, A.E.: Differential evolution and particle swarm optimization against covid-19. Artif. Intell. Rev. 55, 2149–2219 (2022). https://doi.org/10.1007/s10462-021-10052-w

    Article  Google Scholar 

  • Retout, S., Comets, E., Samson, A., Mentré, F.: Design in nonlinear mixed effects models: optimization using the Fedorov-Wynn algorithm and power of the Wald test for binary covariates. Stat. Med. 26(28), 5162–5179 (2007)

    MathSciNet  Google Scholar 

  • Riaz, M., Bashir, M., Younas, I.: Metaheuristics based covid-19 detection using medical images: a review. Comput. Biol. Med. 144, 105344 (2022)

    Google Scholar 

  • Rodríguez-Torreblanca, C., Rodríguez-Díaz, J.: Locally D-and C-optimal designs for Poisson and negative binomial regression models. Metrika 66(2), 161–172 (2007)

    MathSciNet  Google Scholar 

  • Royston, P., Altman, D.G.: Regression using fractional polynomials of continuous covariates: parsimonious parametric modelling. J. R. Stat. Soc. Ser. C Appl. Stat. 43(3), 429–453 (1994)

    Google Scholar 

  • Schmelter, T., Benda, N., Schwabe, R.: Some curiosities in optimal designs for random slopes, pp. 189–195. Springer, New York (2007)

    Google Scholar 

  • Sharma, M., Kaur, P.: A comprehensive analysis of nature-inspired meta-heuristic techniques for feature selection problem. Arch. Comput. Methods Eng. 28, 1103–1127 (2021)

    MathSciNet  Google Scholar 

  • Shi, Y., Zhang, Z., Wong, W.K.: Particle swarm based algorithms for finding locally and Bayesian D-optimal designs. J. Stat. Distrib. Appl. 6(1), 1–17 (2019)

    Google Scholar 

  • Shi, Y., Wong, W.K., Goldin, J., Brown, M.S., Kim, H.J.: Prediction of progression in idiopathic pulmonary fibrosis using quantum particle swarm optimization hybridized random forest. Artif. Intell. Med. 100, 101709 (2019)

    Google Scholar 

  • Silvey, S.D.: Optimal design: an introduction to the theory for parameter estimation. Chapman & Hall, London (1980)

    Google Scholar 

  • Sun, X., Xu, Y., Du, Y.: Convergence of optimal allocation sequence in regression models with cost consideration. In: IEEE Xplore: International conference on frontiers of artificial intelligence and machin learning, pp. 39–41 (2022) https://doi.org/10.1109/FAIML570028.2022.00017

  • Sun, C., Ding, J., Zeng, J., Jin, Y.: A fitness approximation assisted competitive swarm optimizer for large scale expensive optimization problems. Memet. Comput. 10, 1–12 (2016)

    Google Scholar 

  • Tekle, F.B., Tan, F.E.S., Berger, M.P.F.: D-optimal cohort designs for linear mixed-effects models. Stat. Med. 27(14), 2586–2600 (2008)

    MathSciNet  Google Scholar 

  • Whitacre, J.M.: Recent trends indicate rapid growth of nature-inspired optimization in academia and industry. Computing 93, 121–133 (2011)

    MathSciNet  Google Scholar 

  • Whitacre, J.M.: Survival of the flexible: explaining the recent dominance of nature-inspired optimization within a rapidly evolving World. Computing 93, 135–146 (2011)

    MathSciNet  Google Scholar 

  • Xiong, G., Shi, D.: Orthogonal learning competitive swarm optimizer for economic dispatch problems. Appl. Soft Comput. 66, 134 (2018)

    Google Scholar 

  • Xu, W., Wong, W.K., Tan, K.C., Xu, J.X.: Finding high-dimensional \(D\)-optimal designs for logistic models via differential evolution. IEEE Access 7(1), 7133–7146 (2019)

    Google Scholar 

  • Yang, X.S.: Engineering optimization: an introduction with metaheuristic applications. Wiley, Amsterdam (2010)

    Google Scholar 

  • Zhang, W.X., Chen, W.N., Zhang, J.: A dynamic competitive swarm optimizer based-on entropy for large scale optimization. In: 2016 8th International conference on advanced computational intelligence (ICACI), pp. 365–371 (2016). IEEE

  • Zhang, Q., Cheng, H., Ye, Z., Wang, Z.: A competitive swarm optimizer integrated with Cauchy and Gaussian mutation for large scale optimization. In: 2017 36th Chinese control conference (CCC), pp. 9829–9834 (2017). IEEE

  • Zhang, Z., Wong, W.K., Tan, K.C.: Competitive swarm optimizer with mutated agents for finding optimal designs for nonlinear regression models with multiple interacting factors. Memet. Comput. 12, 219–233 (2020)

Download references

Acknowledgements

Drs. Wong and Zhang were partially supported by a grant from the National Institute of General Medical Sciences of the National Institutes of Health under Award Number R01GM107639. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health. Dr. Wong was also partially supported by the Yushan Scholarship Award from the Ministry of Education of Taiwan.

Author information

Authors and Affiliations

Authors

Contributions

Cui and Zhang wrote the main manuscript text and Wong polished the writing. All authors reviewed the manuscript. Zhang prepared Figure 1 and Tables 1-3; wrote the CSOMA codes in Matlab. Cui prepared Figure 2 and Tables 4-5; wrote the CSOMA codes in Python.

Corresponding author

Correspondence to Elvis Han Cui.

Ethics declarations

Conflict of interest

The author declares no competing interest.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendices

Appendices

This appendix has 5 parts. In Appendix A, we list notations used in the paper and give their explanation. Appendix B provides an overview of nature-inspired meta-heuristic algorithms, review the CSO algorithm and show how CSO-MA is derived as a variant of CSO. In Appendix C, we mention online tools available to use CSO-MA and generate optimal designs for the examples in this paper and beyond. In Appendix D, we provide an illustrative derivation of the information matrix for a negative binomial model with a random intercept and a single factor. Extension to more than one factor is quite straightforward. Appendix E provides additional information to fill in some technical details for Application 6. In addition, two algorithms are included in the appendix. Algorithm 1 describes how to use CSO-MA to find optimal designs and Algorithm 2 provides further details on finding Bayesian optimal designs for the nonlinear model used to study HIV dynamics.

Appendix A Table of notations

Notation

Description

Section

\(\textbf{E}(y)\)

Expected value of y

2

\(f(x, \beta )\)

Known nonlinear function

2

\(\beta \)

Model parameters

2

\(\Omega \)

Design space

2

\(\textbf{w}\)

Proportions of observations

2

\(M(\eta , \beta )\)

Fisher information matrix

2

\(\textbf{c}\)

Cost function

3.1

\(M^*(\eta )\)

Normalized information matrix

3.1

r

Cost ratio

3.1

\(T_{\text {max}}\)

Maximum time point

3.2

\(y_{ij}\)

Observation at \(t_{ij}\)

3.2

\(e_{ij}\)

Error term

3.2

D

Covariance matrix of random effects

3.3

\(S_c(\eta , x)\)

Sensitivity function for local c-optimality

3.4

c

Vector for c-optimality criterion

3.4

\(\textbf{y}\)

Observations

3.5

\(t_j\)

Design point

3.5

\(\varvec{\mu }\)

Mean vector

3.5

\(\mathcal {N}\)

Normal distribution

3.5

\(\varvec{\eta }\)

Mean parameter vector

3.5

\(\varvec{\Lambda }\)

Covariance matrix

3.5

\(\textbf{E}\)

Expectation operator

3.5

f

Probability density function

3.5

\(\mathbf {\Sigma }^{-1}\)

Precision matrix

3.5

\(\sigma ^{-2}\)

Precision parameter

3.5

\(\varvec{\theta }_i\)

Parameter vector

3.5

\(V_{0i}\)

Initial plasma concentration

3.5

\(c_i\)

Virion clearance rate

3.5

\(\delta _i\)

Death rate of infected cells

3.5

T

Number of time points

3.5

K

Number of quadratures

3.5

N

Number of samples

3.5

S

Number of y samples

3.5

\(\textbf{t}\)

Design vector

3.5

\(\textbf{y}_i\)

Observation vector for i-th subject

3.5

\(F_1\)

Approximation function 1

3.5

\(F_2\)

Approximation function 2

3.5

\(\varvec{\Phi }\)

Scale matrix for Wishart distribution

3.5

\(\gamma \)

Degrees of freedom for Wishart distribution

3.5

\(\alpha \)

Shape parameter for Gamma distribution

3.5

\(\beta \)

Rate parameter for Gamma distribution

3.5

\(\mathcal {W}\)

Wishart distribution

3.5

\(\mathcal {G}\)

Gamma distribution

3.5

\(\textbf{x}\)

Position vector

3.6

\(\textbf{v}\)

Velocity vector

3.6

\(\textbf{R}_1\)

Random vector 1

3.6

\(\textbf{R}_2\)

Random vector 2

3.6

\(\textbf{R}_3\)

Random vector 3

3.6

\(\phi \)

Social factor

3.6

\(\bar{\textbf{x}}\)

Swarm center

3.6

Appendix B Nature-inspired meta-heuristic algorithms

Nature-inspired meta-heuristic algorithms, such as swarm-based algorithms, now form a dominant component in the optimization literature. Whitacre (2011a, 2011b) documented their meteoric rise in popularity in solving real, high-dimensional and complex optimization problems, and their interest and growth has continued unabated. They are already widely used in engineering and computer science, and recently also in other disciplines for tackling high-dimensional and complex real optimization problems. There are many reviews of such algorithms and their many multi-faceted applications to solve very different types of challenging optimization problems; see, for example, Korani and Mouhoub (2021), and Kashif et al. (2019), among several others. They have several appealing features over current algorithms and the main ones are that their codes are widely and freely available, they are easy to implement and use; they are fast, essentially assumptions free and are general-purpose optimization algorithms. While they do not guarantee that they will find the optimal solution, they frequently do so or find a nearly optimal solution quickly. Some recent studies have shown that swarm-based algorithms can search for hard-to-find optimal designs that were previously deemed difficult. For instance, Chen et al. (2017) found optimal designs for standardized maximin optimal designs for nonlinear models and Xu et al. (2019) found optimal designs for logistic models with many interacting factors.

There are many monographs on nature-inspired meta-heuristic algorithms at various levels; for instance, Yang (2010) monograph is at an introductory level and Heaton (2019) is at a bit more advanced level. Some monographs target specific disciplines; for example, Mendes et al. (2019) focus on agricultural applications and Sharma and Kaur (2021) is interested in feature selection problems and has numerous applications in finance and reinforce learning. meta-heuristics has undoubtedly emerged as a set of dominant optimization tools in industry and academia (Whitacre 2011a) and in artificial intelligence research as well Ezugwu and Shukla (2021). Their applications are plentiful and have been shown capable of solving different types of complex and high-dimensional optimization problems (Khan et al. 2019; Hesami et al. 2020; Cui et al. 2022). Websites like R, Python and MATLAB codes are available at youtube.com, github.com, including at professional websites, such as Matlab.com and SAS.com. For example, the website https://pyswarms.readthedocs.io/en/latest/ has a set of PSO tools written in Python (Miranda 2018). See also https://github.com/ElvisCuiHan/CSOMA, where codes are available for using CSO-MA to solve different types of estimation and design problems in statistics, including imputing missing data optimally or in the optimal selection of variables in ecology. Haidar et al. (2021) provided a high-level Python package for selecting machine learning algorithms and their parameters using PSO.

1.1 B.1 Competitive swarm optimizer

Competitive swarm optimizer (CSO) is a relatively novel swarm-based algorithm that has been proven to be very effective in solving different types of optimization problems (Cheng and Jin 2015). CSO has had successful applications to solve large and hard optimization problems. For example, Gu et al. (2018) applied CSO to select variables for high-dimensional classification models, and Xiong and Shi (2018) used CSO to study a power system economic dispatch, which is typically a complex nonlinear multivariable strongly coupled optimization problem with equality and inequality constraints.

Competitive swarm optimizer algorithm, or CSO for short, minimizes a given function \(f(\textbf{x})\) over a user-specified compact space \(\varvec{\Omega }\) by first generating a set of candidate solutions. In our case, they take the form of a swarm of n particles at positions \(\textbf{x}_1, \;\ldots , \;\textbf{x}_n\), along with their corresponding random velocities \(\textbf{v}_1, \;\ldots , \;\textbf{v}_n\).

After the initial swarm is generated, at each iteration we randomly divide the swarm into \(\left\lfloor \frac{n}{2} \right\rfloor \) pairs and compare their objective function values. We identify \(\textbf{x}^t_i\) as the winner and \(\textbf{x}^t_j\) as the loser if these two are competed at the iteration t and \(f(\textbf{x}^t_i) < f(\textbf{x}^t_j)\). The winner retains the status quo and the loser learns from the winner. The two defining equations for CSO are

$$\begin{aligned} \textbf{v}^{t+1}_{j}= & {} \textbf{R}_1 \otimes \textbf{v}^t_{j} + \textbf{R}_2 \otimes (\textbf{x}^t_{i} - \textbf{x}^t_{j}) + \phi \textbf{R}_3 \otimes (\bar{\textbf{x}}^t - \textbf{x}^t_{j}) \qquad \end{aligned}$$
(B1)
$$\begin{aligned} \text {and}~\textbf{x}^{t+1}_{j}= & {} \textbf{x}^t_{j} + \textbf{v}^{t+1}_{j}, \end{aligned}$$
(B2)

where \(\textbf{R}_1, \;\textbf{R}_2, \;\textbf{R}_3\) are all random vectors whose elements are drawn from U(0, 1); operation \(\otimes \) also represents element-wise multiplication; vector \(\bar{\textbf{x}}^t\) is simply the swarm center at iteration t; social factor \(\phi \) controls the influence of the neighboring particles to the loser and a large value is helpful for enhancing swarm diversity (but possibly impacts convergence rate). This process iterates until some stopping criteria are met.

Simulation results have repeatedly shown that CSO either outperforms or is competitive with several state-of-the-art evolutionary algorithms, including several enhanced versions of PSO. This conclusion was arrived at after comparing CSO performance with state-of-the-art EAs using a variety of benchmark functions with dimensions up to 5000 and found that CSO was frequently the fastest and winner in terms of the quality of the solution (Cheng and Jin 2015; Mohapatra et al. 2017; Sun et al. 2016; Zhang et al. 2016, 2017).

1.2 B.2 Competitive swarm optimizer with mutated agents

Our experience with CSO is that many of the generated design points are at the boundary of the design space \(\varvec{\Omega }\). This is helpful because many optimal designs, especially D-optimal designs, have their support points at the boundary \(\varvec{\Omega }\).

To this end, we propose an improvement on CSO and call the enhanced version, competitive swarm optimizer with Mutated Agents or, in short, CSO-MA. After pairing up the swarm in groups of two at each iteration, we randomly choose a loser particle p as an agent, randomly pick a variable indexed as q and then randomly change the value of \(\textbf{x}_{pq}\) to either \(\textbf{xmax}_{q}\) or \(\textbf{xmin}_q\), where \(\textbf{xmax}_q\) and \(\textbf{xmin}_q\) represent, respectively, the upper bound and lower bound of the q-th variable. If the current optimal value is already close to the global optimum, this change will not hurt since we implement this experiment on a loser particle, which is not leading the movement for the whole swarm; otherwise, this chosen agent restarts a journey from the boundary and has a chance to escape from a local optimum. In an algorithmic form, the proposed CSO-MA is given below.

Algorithm 1
figure a

CSO-MA Algorithm

The computational complexity of CSO is \(\mathcal {O}(nD)\), where n is the swarm size and D is the dimension of the problem. Since our modification only adds one coordinate mutation operation to each particle, its computational complexity is the same as that of CSO. The improved performance of CSO-MA over CSO-MA to find the optimum for many complex multi-dimensional benchmark functions has been validated (Zhang et al. 2020).

Appendix C On the online CSOMA package

The CSOMA algorithm was originally written in Matlab and is available online at https://github.com/ElvisCuiHan/CSOMA/tree/main/CSOMA%20for%20Matlab. We extend it to Python, utilizing the pyswarms package (Miranda 2018) and it is available at https://github.com/ElvisCuiHan/CSOMA/tree/main/CSOMA%20for%20Python. On the same page, an example for finding D-optimal design in a trinomial dose-response model is given.

In addition, codes for application 3 and 7 are also given in https://github.com/ElvisCuiHan/CSOMA/ and users can reproduce the results in the paper by running the run_fractional.m (in the folder High_Dim_D_Optimal_Example) and run_glm_fisher.m (in the folder Fractional_Polynomial_Regression_Example) files in Matlab, respectively.

Appendix D Derivation of the information matrix

Suppose we have a negative binomial model with a random intercept and a single fixed factor. Suppose further that there are n subjects, each with T independent observations and \(\mu _{ij}\) is the mean of the count outcome \(y_{ij}\). Then

$$\begin{aligned} \log \mu _{ij}= & {} \beta _0 + \beta _1x_{i1}+b_i, \; b_i\sim \mathcal {N}(0,\sigma ^2_b),\nonumber \\ {}{} & {} i= 1,\ldots , n,\; j = 1,\ldots ,T. \end{aligned}$$

Lawless (1987) showed that the total likelihood function for such a mixed model is

$$\begin{aligned} L = \prod ^n_{i=1}\prod ^T_{j=1}\frac{\Gamma \left( y_{ij} + \frac{1}{a}\right) }{\Gamma \left( \frac{1}{a}\right) } \left( \frac{a\mu _{ij}}{1+a\mu _{ij}}\right) ^{y_{ij}}\left( \frac{1}{1+a\mu _{ij}}\right) ^{\frac{1}{a}}, \end{aligned}$$

where a is the dispersion factor. Apart from an unimportant additive constant, the log-likelihood is

$$\begin{aligned} \begin{aligned} l = \log L = \sum ^n_{i=1}\sum ^T_{j=1}y_{ij}\log \frac{a\mu _{ij}}{1+a\mu _{ij}} - \sum ^n_{i=1}\sum ^T_{j=1}\frac{1}{a}\log (1+a\mu _{ij}). \end{aligned} \end{aligned}$$

Noting that

$$\begin{aligned} \begin{aligned} \mu _{ij}&= \int e^{\beta _0 + \beta _1x_{i1}+b_i}\frac{1}{\sqrt{2\pi }\sigma _b}e^{-\frac{b_i^2}{2\sigma _b^2}}db_i\\&= e^{\beta _0 + \beta _1x_{i1}+\frac{\sigma _b^2}{2}} \int \frac{1}{\sqrt{2\pi }\sigma _b}e^{-\frac{(b_i-\sigma _b^2)^2}{2\sigma _b^2}}db_i = e^{\beta _0 + \beta _1x_{i1}+\frac{\sigma _b^2}{2}}, \end{aligned} \end{aligned}$$

we calculate the following quantities for the Fisher information matrix:

$$\begin{aligned} \begin{aligned} \frac{\partial l}{\partial \beta _0}&= \sum ^n_{i=1}\sum ^T_{j=1}y_{ij}\frac{1}{1+ae^{\beta _0 + \beta _1x_{i1}+\frac{\sigma _b^2}{2}}}\\&\quad -\sum ^n_{i=1}\sum ^T_{j=1}\frac{e^{\beta _0 + \beta _1x_{i1}+\frac{\sigma _b^2}{2}}}{1+ae^{\beta _0 + \beta _1x_{i1}+\frac{\sigma _b^2}{2}}},\\ \frac{\partial l}{\partial \beta _1}&= \sum ^n_{i=1}\sum ^T_{j=1}y_{ij}\frac{x_{i1}}{1+ae^{\beta _0 + \beta _1x_{i1}+\frac{\sigma _b^2}{2}}}\\&\quad -\sum ^n_{i=1}\sum ^T_{j=1}\frac{x_{i1}e^{\beta _0 + \beta _1x_{i1}+\frac{\sigma _b^2}{2}}}{1+ae^{\beta _0 + \beta _1x_{i1}+\frac{\sigma _b^2}{2}}},\\ \frac{\partial ^2 l}{\partial \beta ^2_0}&= -\sum ^n_{i=1}\sum ^T_{j=1}\frac{e^{\beta _0 + \beta _1x_{i1}+\frac{\sigma _b^2}{2}}}{\left( 1+ae^{\beta _0 + \beta _1x_{i1}+\frac{\sigma _b^2}{2}}\right) ^2}(ay_{ij}+1),\\ \frac{\partial ^2 l}{\partial \beta _0\beta _1}&= - \sum ^n_{i=1}\sum ^T_{j=1}\frac{x_{i1}e^{\beta _0 + \beta _1x_{i1}+\frac{\sigma _b^2}{2}}}{(1+ae^{\beta _0 + \beta _1x_{i1}+\frac{\sigma _b^2}{2}})^2}(ay_{ij}+1),\\ \frac{\partial ^2 l}{\partial \beta ^2_1}&= -\sum ^n_{i=1}\sum ^T_{j=1}\frac{x_{i1}^2e^{\beta _0 + \beta _1x_{i1}+\frac{\sigma _b^2}{2}}}{(1+ae^{\beta _0 + \beta _1x_{i1}+\frac{\sigma _b^2}{2}})^2}(ay_{ij}+1), \;\\ \textbf{E}_{y_{ij}}\left( -\frac{\partial ^2 l}{\partial \beta ^2_0}\right)&= \sum ^n_{i=1}\sum ^T_{j=1}\frac{e^{\beta _0 + \beta _1x_{i1}+\frac{1}{2}}}{1+ae^{\beta _0 + \beta _1x_{i1}+\frac{\sigma _b^2}{2}}},\\ \textbf{E}_{y_{ij}}\left( -\frac{\partial ^2 l}{\partial \beta _0\beta _1}\right)&= \sum ^n_{i=1}\sum ^T_{j=1}\frac{x_{i1}e^{\beta _0 + \beta _1x_{i1}+\frac{\sigma _b^2}{2}}}{1+ae^{\beta _0 + \beta _1x_{i1}+\frac{\sigma _b^2}{2}}},\;\\ \textbf{E}_{y_{ij}}\left( -\frac{\partial ^2 l}{\partial \beta ^2_1}\right)&= \sum ^n_{i=1}\sum ^T_{j=1}\frac{x_{i1}^2e^{\beta _0 + \beta _1x_{i1}+\frac{1}{2}}}{1+ae^{\beta _0 + \beta _1x_{i1}+\frac{\sigma _b^2}{2}}}. \end{aligned} \end{aligned}$$

The information matrix for a mixed negative binomial model with a random intercept and multiple fixed factors can be derived similarly.

Appendix E Details on the Bayesian optimal design for nonlinear mixed models applied to HIV dynamics

In this subsection, we give details on computing the utility function \(\textbf{E}[\textbf{Var}(\mu _{2}|\textbf{y})]\) for the HIV dynamics model. Details for computing \(\textbf{E}[\textbf{Var}(\mu _{3}|\textbf{y})]\) are similar and therefore omitted. Mathematically, the utility function can be written as

$$\begin{aligned} \textbf{E}[\textbf{Var}(\mu _{2}|\textbf{y})] = \textbf{E}(\mu _{2}^2) - \textbf{E}[\textbf{E}^2(\mu _{2}|\textbf{y})]. \end{aligned}$$

Recall that \(\varvec{\mu }\sim \mathcal {N}(\varvec{\eta },\varvec{\Lambda })\), so the first term does not involve \(t_j\) because the second moment of \(\mu _2\) is just \(\eta _2^2+\varvec{\Lambda }_{22}\) where \(\eta _2\) is the second element of \(\varvec{\eta }\) and \(\varvec{\Lambda }_{22}\) is the \((2,2)^{th}\) element of \(\varvec{\Lambda }\). Hence optimization with respect to \(t_j\) only involves the second term and according to theorem 1 in Han and Chaloner (2004), it is finite. It requires the computation of

$$\begin{aligned} \textbf{E}(\mu _{2}|\textbf{y})&= \int \mu _2f(\varvec{\mu }|\textbf{y})d\varvec{\mu }\propto \int \mu _2f(\varvec{\mu },\textbf{y})d\varvec{\mu }\\&= \int \mu _{2} f(\textbf{y}|\varvec{\mu },\varvec{\Sigma }^{-1}, \sigma ^{-2}) f(\varvec{\mu },\varvec{\Sigma }^{-1}, \sigma ^{-2})d\varvec{\mu }d\varvec{\Sigma }^{-1}d\sigma ^{-2}. \end{aligned}$$

Recall that for fixed i and j, we have \(f(y_{ij}|\varvec{\mu }, \varvec{\Sigma }^{-1}, \sigma ^{-2}) = \int f(y_{ij}|\varvec{\theta }_i,t_j, \sigma ^{-2})f(\varvec{\theta }_i|\varvec{\mu }, \varvec{\Sigma })d\varvec{\theta }_i,\) where \(\varvec{\theta }_i=(\log V_{0i},\log c_i,\log \delta _i)^T\) is defined in equation (6) in the paper. The density \(f(\textbf{y}_{i}|\varvec{\mu },\varvec{\Sigma }^{-1},\sigma ^{-2})\) can be approximated as follows (for a fixed design \(t_{ij},j=1,\ldots ,T\)):

$$\begin{aligned} \begin{aligned}&f(\textbf{y}_{i}|\mathbf {\mu }, \varvec{\Sigma }^{-1}, \sigma ^{-2})\\&\quad =\int \prod _{j=1}^Tf(y_{ij}|\varvec{\theta }_i,t_j,\sigma ^{-2})f(\varvec{\theta }_i|\varvec{\mu },\varvec{\Sigma }^{-1})d\varvec{\theta }_i\\&\quad \approx \frac{1}{K}\sum _{k=1}^{K}\prod _{j=1}^Tf(y_{ij}|\varvec{\theta }_k, t_j, \sigma ^{-2})f(\varvec{\theta }_k|\varvec{\mu }, \varvec{\Sigma }^{-1}) \\&\quad =\sum _{k=1}^{K} \frac{1}{(2\pi )^2\sigma \sqrt{|\varvec{\Sigma }|}K}\prod _{j=1}^T\\&\qquad \exp \left\{ -\frac{[y_{ij}-s(\varvec{\theta }_k, t_j)]^2}{2\sigma ^2}-\frac{1}{2}(\varvec{\theta }_k-\varvec{\mu }) \varvec{\Sigma }^{-1}(\varvec{\theta }_k-\varvec{\mu })'\right\} , \end{aligned} \end{aligned}$$
(E3)

where T is the number of time points (T=16 in our paper) and K is the number of quadratures. We found that \(K=5\) is sufficient to obtain stable results. We denote the above approximation by \(F_1\)(\(\textbf{t}\), \(\textbf{y}_{i}\), \(\varvec{\mu }\), \(\varvec{\Sigma }^{-1}\), \(\sigma ^{-2}\), K). Next, we use a sampling scheme to derive i.i.d. samples \((\varvec{\mu }_i,\varvec{\Sigma }_i^{-1},\sigma _i^{-2})\) for \(i=1,\cdots ,s\), and hence

$$\begin{aligned} \begin{aligned} \textbf{E}(\mu _{2}|\textbf{y})&\propto \frac{1}{N}\sum _{i=1}^{N}{F_1(\textbf{t}, \textbf{y}_{i}, \varvec{\mu }_i, \varvec{\Sigma }^{-1}_i, \sigma ^{-2}_i, K)f(\varvec{\mu }_i,\varvec{\Sigma }^{-1}_i, \sigma _i^{-2})\mu _{i2}}, \end{aligned} \end{aligned}$$
(E4)

where \(N=5\) gives stable results and

$$\begin{aligned} f(\varvec{\mu },\varvec{\Sigma }^{-1}, \sigma ^{-2}) =&\mathcal {N}_3(\varvec{\mu }|\varvec{\eta },\varvec{\Lambda }) \times \mathcal {W}(\varvec{\Sigma ^{-1}|\varvec{\Phi },\gamma })\times \mathcal {G}(\sigma ^{-2}|\alpha ,\beta )\\ =&\frac{1}{\sqrt{2\pi }^3\sqrt{|\varvec{\Lambda }|}} \exp \left[ -\frac{1}{2}(\varvec{\mu } - \varvec{\eta }) \varvec{\Lambda }^{-1}(\varvec{\mu } -\varvec{\eta })'\right] \\&\times \frac{|\varvec{\Sigma }^{-1}|^{\frac{\gamma -3-1}{2}} \exp \left[ -tr(\varvec{\Phi }^{-1} \varvec{\Sigma }^{-1})/2\right] }{2^{\frac{3\gamma }{2}}|\varvec{\Phi }|^{\frac{\gamma }{2}} \Gamma _3\left( \frac{\gamma }{2}\right) }\\&\frac{\beta ^\alpha }{\Gamma (\alpha )}(\sigma ^{-2})^{\alpha -1} \exp (-\beta \sigma ^{-2}), \end{aligned}$$

and

$$\begin{aligned} \Gamma _3\left( \frac{\gamma }{2}\right) = \pi ^{1.5}\Gamma \left( \frac{\gamma }{2}\right) \Gamma \left( \frac{\gamma }{2}-0.5\right) \Gamma \left( \frac{\gamma }{2}-1\right) . \end{aligned}$$

We denote the above approximation (E4) as \(F_2\)(\(\textbf{t}\), \(\textbf{y}_i\), K, \(\varvec{\Phi }\), \(\gamma \), \(\varvec{\eta }\), \(\varvec{\Lambda }\), \(\alpha \), \(\beta \), N). We then draw S different y samples to approximate the outer expectation:

$$\begin{aligned} \begin{aligned} \textbf{E}[\textbf{E}^2(\mu _{2}|\textbf{y})]&\approx \frac{1}{S}\sum ^S_{i=1}{F^2_2(\textbf{t},\textbf{y}_i,K,\varvec{\Phi },\gamma ,\varvec{\eta },\varvec{\Lambda },\alpha ,\beta ,N)} \end{aligned} \end{aligned}$$
(E5)

To sum up, we use the following algorithm to generate a Bayesian design:

  • We start with a sequence of random y, say, generated uniformly from \(-\,10\) to 10.

  • Given the initial \(\textbf{y}\), we apply CSO-MA to find the optimal \(\textbf{t}\).

  • Given the optimal \(\textbf{t}\) we obtain in Step 2, we resample \(\textbf{y}\).

  • Iterate between Steps 2 and 3 until some user-specified stopping criterion is met. In our case, we run 30 times in total and we set \(T=16\), \(N=5, K=5\) and \(S=50\).

Algorithm 2
figure b

Bayesian Optimal Design for Nonlinear Mixed Models to Study HIV Dynamics

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Cui, E.H., Zhang, Z. & Wong, W.K. Optimal designs for nonlinear mixed-effects models using competitive swarm optimizer with mutated agents. Stat Comput 34, 156 (2024). https://doi.org/10.1007/s11222-024-10468-8

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11222-024-10468-8

Keywords

Navigation