|
227 | 227 | <!--radix_placeholder_rmarkdown_metadata--> |
228 | 228 |
|
229 | 229 | <script type="text/json" id="radix-rmarkdown-metadata"> |
230 | | - {"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["title","description","author","date","date_received","journal","volume","issue","slug","citation_url","packages","preview","bibliography","CTV","legacy_pdf","legacy_converted","output","draft","pdf_url","doi","creative_commons","csl"]}},"value":[{"type":"character","attributes":{},"value":["Bayesian Model Selection with Latent Group-Based Effects and Variances with the R Package slgf"]},{"type":"character","attributes":{},"value":["Linear modeling is ubiquitous, but performance can suffer when the\nmodel is misspecified. We have recently demonstrated that latent\ngroupings in the levels of categorical predictors can complicate\ninference in a variety of fields including bioinformatics,\nagriculture, industry, engineering, and medicine. Here we present the\nR package slgf which enables the user to easily implement our\nrecently-developed approach to detect group-based regression effects,\nlatent interactions, and/or heteroscedastic error variance through\nBayesian model selection. We focus on the scenario in which the levels\nof a categorical predictor exhibit two latent groups. We treat the\ndetection of this grouping structure as an unsupervised learning\nproblem by searching the space of possible groupings of factor levels.\nFirst we review the suspected latent grouping factor (SLGF) method.\nNext, using both observational and experimental data, we illustrate\nthe usage of slgf in the context of several common linear model\nlayouts: one-way analysis of variance (ANOVA), analysis of covariance\n(ANCOVA), a two-way replicated layout, and a two-way unreplicated\nlayout. We have selected data that reveal the shortcomings of\nclassical analyses to emphasize the advantage our method can provide\nwhen a latent grouping structure is present.\n"]},{"type":"list","attributes":{},"value":[{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["name","affiliation","orcid_id","address"]}},"value":[{"type":"character","attributes":{},"value":["Thomas A. Metzger"]},{"type":"character","attributes":{},"value":["Department of Statistics, The Ohio State University"]},{"type":"character","attributes":{},"value":["0000-0003-3620-1405"]},{"type":"character","attributes":{},"value":["1958 Neil Avenue, Columbus, Ohio 43210","United States of America","[metzger.181@osu.edu](metzger.181@osu.edu){.uri}\n"]}]},{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["name","affiliation","address"]}},"value":[{"type":"character","attributes":{},"value":["Christopher T. Franck"]},{"type":"character","attributes":{},"value":["Department of Statistics, Virginia Tech"]},{"type":"character","attributes":{},"value":["403E Hutcheson Hall, Blacksburg, VA 24060","United States","(ORCiD: 0000-0003-1251-4378)","[chfranck@vt.edu](chfranck@vt.edu){.uri}\n"]}]}]},{"type":"character","attributes":{},"value":["2025-01-11"]},{"type":"character","attributes":{},"value":["2022-12-31"]},{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["title","issn","firstpage","lastpage"]}},"value":[{"type":"character","attributes":{},"value":["The R Journal"]},{"type":"character","attributes":{},"value":["2073-4859"]},{"type":"integer","attributes":{},"value":[175]},{"type":"integer","attributes":{},"value":[191]}]},{"type":"integer","attributes":{},"value":[16]},{"type":"integer","attributes":{},"value":[1]},{"type":"character","attributes":{},"value":["RJ-2024-010"]},{"type":"character","attributes":{},"value":["https://doi.org/10.32614/RJ-2024-010"]},{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["cran","bioc"]}},"value":[{"type":"character","attributes":{},"value":["slgf","numDeriv","mixtools","flexmix","MultiLCIRT"]},{"type":"list","attributes":{},"value":[]}]},{"type":"character","attributes":{},"value":["preview.png"]},{"type":"character","attributes":{},"value":["slgf.bib"]},{"type":"character","attributes":{},"value":["Cluster","Distributions","Environmetrics","NumericalMathematics","Psychometrics"]},{"type":"logical","attributes":{},"value":[true]},{"type":"logical","attributes":{},"value":[true]},{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["distill::distill_article"]}},"value":[{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["self_contained","toc","mathjax","md_extension"]}},"value":[{"type":"logical","attributes":{},"value":[true]},{"type":"logical","attributes":{},"value":[false]},{"type":"character","attributes":{},"value":["https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js"]},{"type":"character","attributes":{},"value":["-tex_math_single_backslash"]}]}]},{"type":"logical","attributes":{},"value":[false]},{"type":"character","attributes":{},"value":["RJ-2024-010.pdf"]},{"type":"character","attributes":{},"value":["10.32614/RJ-2024-010"]},{"type":"character","attributes":{},"value":["CC BY"]},{"type":"character","attributes":{},"value":["/home/mitchell/R/x86_64-pc-linux-gnu-library/4.4/rjtools/rjournal.csl"]}]} |
| 230 | + {"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["title","description","author","date","date_received","journal","volume","issue","slug","citation_url","packages","preview","bibliography","CTV","legacy_pdf","legacy_converted","output","draft","pdf_url","doi","creative_commons","csl"]}},"value":[{"type":"character","attributes":{},"value":["Bayesian Model Selection with Latent Group-Based Effects and Variances with the R Package slgf"]},{"type":"character","attributes":{},"value":["Linear modeling is ubiquitous, but performance can suffer when the\nmodel is misspecified. We have recently demonstrated that latent\ngroupings in the levels of categorical predictors can complicate\ninference in a variety of fields including bioinformatics,\nagriculture, industry, engineering, and medicine. Here we present the\nR package slgf which enables the user to easily implement our\nrecently-developed approach to detect group-based regression effects,\nlatent interactions, and/or heteroscedastic error variance through\nBayesian model selection. We focus on the scenario in which the levels\nof a categorical predictor exhibit two latent groups. We treat the\ndetection of this grouping structure as an unsupervised learning\nproblem by searching the space of possible groupings of factor levels.\nFirst we review the suspected latent grouping factor (SLGF) method.\nNext, using both observational and experimental data, we illustrate\nthe usage of slgf in the context of several common linear model\nlayouts: one-way analysis of variance (ANOVA), analysis of covariance\n(ANCOVA), a two-way replicated layout, and a two-way unreplicated\nlayout. We have selected data that reveal the shortcomings of\nclassical analyses to emphasize the advantage our method can provide\nwhen a latent grouping structure is present.\n"]},{"type":"list","attributes":{},"value":[{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["name","affiliation","orcid_id","address"]}},"value":[{"type":"character","attributes":{},"value":["Thomas A. Metzger"]},{"type":"character","attributes":{},"value":["Department of Statistics, The Ohio State University"]},{"type":"character","attributes":{},"value":["0000-0003-3620-1405"]},{"type":"character","attributes":{},"value":["1958 Neil Avenue, Columbus, Ohio 43210","United States of America","[metzger.181@osu.edu](metzger.181@osu.edu){.uri}\n"]}]},{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["name","affiliation","address"]}},"value":[{"type":"character","attributes":{},"value":["Christopher T. Franck"]},{"type":"character","attributes":{},"value":["Department of Statistics, Virginia Tech"]},{"type":"character","attributes":{},"value":["403E Hutcheson Hall, Blacksburg, VA 24060","United States","(ORCiD: 0000-0003-1251-4378)","[chfranck@vt.edu](chfranck@vt.edu){.uri}\n"]}]}]},{"type":"character","attributes":{},"value":["2025-01-11"]},{"type":"character","attributes":{},"value":["2022-12-31"]},{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["title","issn","firstpage","lastpage"]}},"value":[{"type":"character","attributes":{},"value":["The R Journal"]},{"type":"character","attributes":{},"value":["2073-4859"]},{"type":"integer","attributes":{},"value":[175]},{"type":"integer","attributes":{},"value":[191]}]},{"type":"integer","attributes":{},"value":[16]},{"type":"integer","attributes":{},"value":[1]},{"type":"character","attributes":{},"value":["RJ-2024-010"]},{"type":"character","attributes":{},"value":["https://doi.org/10.32614/RJ-2024-010"]},{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["cran","bioc"]}},"value":[{"type":"character","attributes":{},"value":["slgf","numDeriv","mixtools","flexmix","MultiLCIRT"]},{"type":"list","attributes":{},"value":[]}]},{"type":"character","attributes":{},"value":["preview.png"]},{"type":"character","attributes":{},"value":["slgf.bib"]},{"type":"character","attributes":{},"value":["Cluster","Distributions","Environmetrics","NumericalMathematics","Psychometrics"]},{"type":"logical","attributes":{},"value":[true]},{"type":"logical","attributes":{},"value":[true]},{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["distill::distill_article"]}},"value":[{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["self_contained","toc","mathjax","md_extension"]}},"value":[{"type":"logical","attributes":{},"value":[true]},{"type":"logical","attributes":{},"value":[false]},{"type":"character","attributes":{},"value":["https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"]},{"type":"character","attributes":{},"value":["-tex_math_single_backslash"]}]}]},{"type":"logical","attributes":{},"value":[false]},{"type":"character","attributes":{},"value":["RJ-2024-010.pdf"]},{"type":"character","attributes":{},"value":["10.32614/RJ-2024-010"]},{"type":"character","attributes":{},"value":["CC BY"]},{"type":"character","attributes":{},"value":["/home/mitchell/R/x86_64-pc-linux-gnu-library/4.4/rjtools/rjournal.csl"]}]} |
231 | 231 | </script> |
232 | 232 | <!--/radix_placeholder_rmarkdown_metadata--> |
233 | 233 |
|
@@ -3065,9 +3065,14 @@ <h4 class="unnumbered" data-number="2.4" id="fractional-bayes-factors-and-poster |
3065 | 3065 | <span class="math inline">\(\boldsymbol{\theta}^{\star}_b\)</span> and <span class="math inline">\(\boldsymbol{\theta}^{\star}\)</span>, we |
3066 | 3066 | first transform <span class="math inline">\(\gamma_1=\log\left(\frac{1}{\sigma^2_1}\right)\)</span> and |
3067 | 3067 | <span class="math inline">\(\gamma_2=\log\left(\frac{1}{\sigma^2_2}\right)\)</span> to stabilize the |
3068 | | -optimization. We optimize |
3069 | | -<span class="math inline">\(\log P(\boldsymbol{Y}|g,\sigma^2_1,\sigma^2_2)^b\pi(\sigma^2_1,\sigma^2_2,g)=\frac{n_1b}{2}\log \gamma_1+\frac{n_2b}{2}\gamma_2-\frac{P}{2}\log g+\frac{1}{2}|X^T\tilde{\Sigma}X|-\frac{1}{2}\log|\frac{bg+1}{bg}X^T(\tilde{\Sigma}-Z_{\tilde{\Sigma}})X|-\frac{b}{2}\boldsymbol{Y}^T \left(\tilde{\Sigma}-Z_{\tilde{\Sigma}}-(\tilde{\Sigma}-Z_{\tilde{\Sigma}})X\left(\frac{bg+1}{bg}X^T\tilde{\Sigma}X-X^T Z_{\tilde{\Sigma}}X\right)^{-1}X^T(\tilde{\Sigma}-Z_{\tilde{\Sigma}}) \right) \boldsymbol{Y}-\frac{3}{2}\log(g)-\frac{N}{2g}+\log(J)\)</span> |
3070 | | -using the Nelder-Mead method from <strong>optim</strong> where |
| 3068 | +optimization. We optimize</p> |
| 3069 | +<p><span class="math display">\[\begin{split} |
| 3070 | +\log &P(\boldsymbol{Y}|g,\sigma^2_1,\sigma^2_2)^b\pi(\sigma^2_1,\sigma^2_2,g)=\frac{n_1b}{2}\log \gamma_1+\frac{n_2b}{2}\gamma_2-\frac{P}{2}\log g+\frac{1}{2}|X^T\tilde{\Sigma}X|-\\ |
| 3071 | +& \frac{1}{2}\log|\frac{bg+1}{bg}X^T(\tilde{\Sigma}-Z_{\tilde{\Sigma}})X|- \\ |
| 3072 | +& \frac{b}{2}\boldsymbol{Y}^T \left(\tilde{\Sigma}-Z_{\tilde{\Sigma}}-(\tilde{\Sigma}-Z_{\tilde{\Sigma}})X\left(\frac{bg+1}{bg}X^T\tilde{\Sigma}X-X^T Z_{\tilde{\Sigma}}X\right)^{-1}X^T(\tilde{\Sigma}-Z_{\tilde{\Sigma}}) \right) \boldsymbol{Y}-\\ |
| 3073 | +& \frac{3}{2}\log(g)-\frac{N}{2g}+\log(J) |
| 3074 | +\end{split}\]</span></p> |
| 3075 | +<p>using the Nelder-Mead method from <strong>optim</strong> where |
3071 | 3076 | <span class="math inline">\(Z_{\tilde{\Sigma}}=\tilde{\Sigma}Z(Z^T \tilde{\Sigma} Z)^{-1}Z^T \tilde{\Sigma}\)</span>, |
3072 | 3077 | <span class="math inline">\(Z=\boldsymbol{1}^T\)</span>, and <span class="math inline">\(\log(J)=-(\gamma_1+\gamma_2)\)</span> represents the |
3073 | 3078 | determinant of the log-precision transformation. For <span class="math inline">\(b=1\)</span> these |
@@ -3777,7 +3782,7 @@ <h3 class="appendix" data-number="8" id="note"><span class="header-section-numbe |
3777 | 3782 | (function () { |
3778 | 3783 | var script = document.createElement("script"); |
3779 | 3784 | script.type = "text/javascript"; |
3780 | | - script.src = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js"; |
| 3785 | + script.src = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"; |
3781 | 3786 | document.getElementsByTagName("head")[0].appendChild(script); |
3782 | 3787 | })(); |
3783 | 3788 | </script> |
|
0 commit comments