Skip to content

Commit

Permalink
Deploying to gh-pages from @ 751cb23 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
freezenik committed Oct 14, 2024
1 parent f34ccb4 commit 3061151
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 63 deletions.
Binary file modified man/HarzTraffic_files/figure-html/unnamed-chunk-1-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion man/gamlss2.html
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ <h3 class="anchored" data-anchor-id="examples">Examples</h3>
*--------
n = 610 df = 13.12 res.df = 596.88
Deviance = 4770.1554 Null Dev. Red. = 33.39%
AIC = 4796.3966 elapsed = 0.78sec</code></pre>
AIC = 4796.3966 elapsed = 0.77sec</code></pre>
</div>
<div class="sourceCode cell-code" id="cb5"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="do">## plot estimated effects</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="fu">plot</span>(b, <span class="at">which =</span> <span class="st">"effects"</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
Expand Down
8 changes: 4 additions & 4 deletions man/prodist.gamlss2.html
Original file line number Diff line number Diff line change
Expand Up @@ -537,10 +537,10 @@ <h3 class="anchored" data-anchor-id="examples">Examples</h3>
<div class="sourceCode cell-code" id="cb16"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="do">## simulate random numbers</span></span>
<span id="cb16-2"><a href="#cb16-2" aria-hidden="true" tabindex="-1"></a><span class="fu">random</span>(d, <span class="dv">5</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code> r_1 r_2 r_3 r_4 r_5
1 49.46417 43.74521 15.64832 16.14411 24.40045
2 48.73735 39.49597 28.76521 60.20798 32.97853
3 135.79246 117.37999 118.64879 92.26730 100.15979</code></pre>
<pre><code> r_1 r_2 r_3 r_4 r_5
1 29.15083 28.25206 37.54823 22.39143 19.20124
2 79.74554 43.36832 71.38394 32.39768 52.17705
3 78.58056 169.09076 172.99766 106.80344 82.23454</code></pre>
</div>
<div class="sourceCode cell-code" id="cb18"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a><span class="do">## density and distribution</span></span>
<span id="cb18-2"><a href="#cb18-2" aria-hidden="true" tabindex="-1"></a><span class="fu">pdf</span>(d, <span class="dv">50</span> <span class="sc">*</span> <span class="sc">-</span><span class="dv">2</span><span class="sc">:</span><span class="dv">2</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
Expand Down
18 changes: 9 additions & 9 deletions search.json

Large diffs are not rendered by default.

19 changes: 11 additions & 8 deletions vignettes/families.html
Original file line number Diff line number Diff line change
Expand Up @@ -464,22 +464,22 @@ <h1 class="title display-7">Family Objects</h1>
</header>


<p>Note that all family objects of the <em>gamlss.dist</em> package can be used for modeling. However, for users wanting to specify their own (new) distribution model, this document provides a guide on how to define custom family objects within the gamlss2 framework.</p>
<p>Family objects in the <em>gamlss2</em> package play an essential role in defining the models used for fitting data to distributions. These objects encapsulate the necessary details about the distribution and the parameters, such as:</p>
<p>All family objects of the <code>gamlss.dist</code> package, see <span class="citation" data-cites="Rigbyetal2019">Rigby et al. (<a href="#ref-Rigbyetal2019" role="doc-biblioref">2019</a>)</span>, can be used for modelling in <code>gamlss2</code>. However, for users wanting to specify their own (new) distribution model, this document provides a guide on how to define custom family objects within the <code>gamlss2</code> framework.</p>
<p>Family objects in the <code>gamlss2</code> package play an essential role in defining the models used for fitting data to distributions. These objects encapsulate the necessary details about the distribution and the parameters, such as:</p>
<ul>
<li>The names of the parameters.</li>
<li>The link functions that map the parameters to the predictor.</li>
<li>Functions for the density, log-likelihood, and their derivatives.</li>
</ul>
<p>This document provides an overview of how to construct and use family objects within <em>gamlss2</em>. By the end, you should have a good understanding of how to implement a custom family for use in statistical models.</p>
<p>This document provides an overview of how to construct and use family objects within <code>gamlss2</code>. By the end, you should have a good understanding of how to implement a custom family for use in statistical models.</p>
<section id="defining-family-objects" class="level2" data-number="1">
<h2 data-number="1" class="anchored" data-anchor-id="defining-family-objects"><span class="header-section-number">1</span> Defining Family Objects</h2>
<p>A family object in <em>gamlss2</em> is a list that must meet the following minimum criteria:</p>
<ul>
<li>Family Name: The object must contain the family name as a character string.</li>
<li>Parameters: The object must list the parameters of the distribution (e.g., <code>"mu"</code> and <code>"sigma"</code> for a normal distribution).</li>
<li>Link Functions: It must specify the link functions associated with each parameter.</li>
<li>Density Function: A <code>d()</code> function must be provided to evaluate the (log-)density of the distribution.</li>
<li><strong>Family Name</strong>: The object must contain the family name as a character string.</li>
<li><strong>Parameters</strong>: The object must list the parameters of the distribution (e.g., <code>"mu"</code> and <code>"sigma"</code> for a normal distribution).</li>
<li><strong>Link Functions</strong>: It must specify the link functions associated with each parameter.</li>
<li><strong>Density Function</strong>: A <code>d()</code> function must be provided to evaluate the (log-)density of the distribution.</li>
</ul>
<p>Optionally, a family object can include functions to calculate the log-likelihood, random number generation, cumulative distribution function (CDF), and quantile function.</p>
<p>Here’s an example of a minimal family object for the normal distribution.</p>
Expand Down Expand Up @@ -566,7 +566,7 @@ <h2 data-number="4" class="anchored" data-anchor-id="additional-functions"><span
<section id="flexible-links" class="level2" data-number="5">
<h2 data-number="5" class="anchored" data-anchor-id="flexible-links"><span class="header-section-number">5</span> Flexible Links</h2>
<p>Note that the example above used static link functions to define the family object. However, users can easily create families with flexible link functions as well. A helpful example of how to implement such flexibility can be found in the Kumaraswamy distribution implementation, which provides a clear template for setting up families with customizable link functions.</p>
<p>The Kumaraswamy distribution is a continuous distribution defined on the interval <span class="math inline">\((0, 1)\)</span>. It is similar to the Beta distribution but has simpler forms for its cumulative distribution and inverse cumulative distribution functions, making it more computationally efficient for certain applications.</p>
<p>The Kumaraswamy distribution is a continuous distribution defined on the interval <span class="math inline">\((0, 1)\)</span>. It is similar to the Beta distribution but has simpler forms for its cumulative distribution and inverse cumulative distribution functions, making it more computationally efficient for certain applications. Unfortunately the Kumaraswamy distribution parameters do not conform with the <em>distribution regression principal</em> that parameters should have a clear interpretation in terms of <em>location</em> and <em>scale</em>. For example, the mean and variance of the distribution are a rather complicated functions of the parameters <code>a</code> and <code>b</code>, nevertheless the distribution is a good example of two parameter distribution in which the parameters are not named as <code>mu</code> and <code>sigma</code> as in all distributions defined in <span class="citation" data-cites="Rigbyetal2019">Rigby et al. (<a href="#ref-Rigbyetal2019" role="doc-biblioref">2019</a>)</span>.</p>
<p>The probability density function (PDF) of the Kumaraswamy distribution is:</p>
<p><span class="math display">\[
f(y; a, b) = aby^{a-1}(1 - y^a)^{b-1}
Expand Down Expand Up @@ -644,6 +644,9 @@ <h2 data-number="6" class="anchored" data-anchor-id="summary"><span class="heade
<div id="ref-Rigby+Stasinopoulos:2005" class="csl-entry" role="listitem">
Rigby, R. A., and D. M. Stasinopoulos. 2005. <span>“Generalized Additive Models for Location, Scale and Shape.”</span> <em>Journal of the Royal Statistical Society C</em> 54 (3): 507–54. <a href="https://doi.org/10.1111/j.1467-9876.2005.00510.x">https://doi.org/10.1111/j.1467-9876.2005.00510.x</a>.
</div>
<div id="ref-Rigbyetal2019" class="csl-entry" role="listitem">
Rigby, R. A., D. M. Stasinopoulos, G. Z. Heller, and F. De Bastiani. 2019. <em>Distributions for Modeling Location, Scale, and Shape: Using <span>GAMLSS</span> in <span>R</span></em>. Boca Raton: Chapman &amp; Hall/CRC. <a href="https://doi.org/10.1201/9780429298547">https://doi.org/10.1201/9780429298547</a>.
</div>
</div></section></div></main> <!-- /main -->
<script id="quarto-html-after-body" type="application/javascript">
window.document.addEventListener("DOMContentLoaded", function (event) {
Expand Down
Binary file modified vignettes/gamlss2_files/figure-html/unnamed-chunk-9-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions vignettes/quantiles.html
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ <h1 class="title display-7">Quantile Estimation</h1>
<h2 data-number="1" class="anchored" data-anchor-id="film90-data"><span class="header-section-number">1</span> <code>film90</code> Data</h2>
<p>In this example, we use the <code>film90</code> dataset from the gamlss.data package to illustrate quantile estimation using a flexible <code>BCPE</code> distribution. The model allows us to estimate quantiles based on the predictors, providing a richer understanding of the underlying data.</p>
<p>The model is estimated with.</p>
<div class="cell">
<div class="cell" data-layout-align="center">
<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(<span class="st">"gamlss2"</span>)</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="do">## load the data</span></span>
Expand All @@ -445,9 +445,9 @@ <h2 data-number="1" class="anchored" data-anchor-id="film90-data"><span class="h
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a><span class="fu">par</span>(<span class="at">mar =</span> <span class="fu">c</span>(<span class="dv">4</span>, <span class="dv">4</span>, <span class="dv">1</span>, <span class="dv">1</span>))</span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a><span class="fu">plot</span>(lborev1 <span class="sc">~</span> lboopen, <span class="at">data =</span> film90)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output-display">
<div>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="quantiles_files/figure-html/unnamed-chunk-1-1.png" class="img-fluid figure-img" width="672"></p>
<p><img src="quantiles_files/figure-html/unnamed-chunk-1-1.png" class="img-fluid quarto-figure quarto-figure-center figure-img" width="576"></p>
</figure>
</div>
</div>
Expand Down
Binary file modified vignettes/quantiles_files/figure-html/unnamed-chunk-1-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions vignettes/s_pb.html
Original file line number Diff line number Diff line change
Expand Up @@ -400,40 +400,40 @@ <h1 class="title display-7">Smooth Terms using s() and pb()</h1>
Fahrmeir, Ludwig, Thomas Kneib, Stefan Lang, and Brian Marx. 2021. <em>Regression – Models, Methods and Applications</em>. 2nd ed. Berlin: Springer-Verlag. <a href="https://doi.org/10.1007/978-3-662-63882-8">https://doi.org/10.1007/978-3-662-63882-8</a>.
</div>
<div id="ref-Hofneretal2014" class="csl-entry" role="listitem">
Hofner, B., A. Mayr, N. Robinzonov, and M. Schmid. 2014. <span>“Model-Based Boosting in <span>R</span>: <span>A</span> Hands-on Tutorial Using the <span>R</span> Package <span class="nocase">mboost</span>.”</span> <em>Computational Statistics</em> 29: 3–35. <a href="https://doi.org/10.1007/s00180-012-0382-5">https://doi.org/10.1007/s00180-012-0382-5</a>.
Hofner, B., A. Mayr, N. Robinzonov, and M. Schmid. 2014. <span>“Model-Based Boosting in r: A Hands-on Tutorial Using the r Package Mboost.”</span> <em>Computational Statistics</em> 29: 3–35.
</div>
<div id="ref-hofner2015" class="csl-entry" role="listitem">
Hofner, B., A. Mayr, and M. Schmid. 2016. <span><span class="nocase">gamboostLSS</span>: An <span>R</span> Package for Model Building and Variable Selection in the <span>GAMLSS</span> Framework.”</span> <em>Journal of Statistical Software</em> 74 (1): 1–31. <a href="https://doi.org/10.18637/jss.v074.i01">https://doi.org/10.18637/jss.v074.i01</a>.
Hofner, B., A. Mayr, and M. Schmid. 2016. <span><span class="nocase">gamboostLSS</span>: An <span>R</span> Package for Model Building and Variable Selection in the <span>GAMLSS</span> Framework.”</span> <em>Journal of Statistical Software</em> 74 (1): 1–31.
</div>
<div id="ref-KleiberZeileis2016" class="csl-entry" role="listitem">
Kleiber, C., and A. Zeileis. 2016. <span>“Visualizing Count Data Regressions Using Rootograms.”</span> <em>The American Statistician</em> 70 (3): 296–303. <a href="https://doi.org/10.1080/00031305.2016.1173590">https://doi.org/10.1080/00031305.2016.1173590</a>.
Kleiber, C., and A. Zeileis. 2016. <span>“Visualizing Count Data Regressions Using Rootograms.”</span> <em>The American Statistician</em> 70 (3): 296–303.
</div>
<div id="ref-Lang+Umlauf+Wechselberger+Harttgen+Kneib:2012" class="csl-entry" role="listitem">
Lang, Stefan, Nikolaus Umlauf, Peter Wechselberger, Kenneth Harttgen, and Thomas Kneib. 2012. <span>“Multilevel Structured Additive Regression.”</span> <em>Statistics and Computing</em> 24 (2): 223–38. <a href="https://doi.org/10.1007/s11222-012-9366-0">https://doi.org/10.1007/s11222-012-9366-0</a>.
</div>
<div id="ref-Mayretal2012" class="csl-entry" role="listitem">
Mayr, A., N. Fenske, B. Hofner, T. Kneib, and M. Schmid. 2012. <span>“Generalized Additive Models for Location, Scale and Shape for High Dimensional Data, a Flexible Approach Based on Boosting.”</span> <em>Journal of the Royal Statistical Society C</em> 61: 403–27. <a href="https://doi.org/10.1111/j.1467-9876.2011.01033.x">https://doi.org/10.1111/j.1467-9876.2011.01033.x</a>.
Mayr, A., N. Fenske, B. Hofner, T. Kneib, and M. Schmid. 2012. <span>“Generalized Additive Models for Location, Scale and Shape for High Dimensional Data, a Flexible Approach Based on Boosting.”</span> <em>J. R. Statist. Soc. Series C</em> 61: 403–27.
</div>
<div id="ref-Rigby+Stasinopoulos:2005" class="csl-entry" role="listitem">
Rigby, R. A., and D. M. Stasinopoulos. 2005. <span>“Generalized Additive Models for Location, Scale and Shape.”</span> <em>Journal of the Royal Statistical Society C</em> 54 (3): 507–54. <a href="https://doi.org/10.1111/j.1467-9876.2005.00510.x">https://doi.org/10.1111/j.1467-9876.2005.00510.x</a>.
</div>
<div id="ref-Rigbyetal2019" class="csl-entry" role="listitem">
Rigby, R. A., D. M. Stasinopoulos, G. Z. Heller, and F. De Bastiani. 2019. <em>Distributions for Modeling Location, Scale, and Shape: Using <span>GAMLSS</span> in <span>R</span></em>. Boca Raton: Chapman &amp; Hall/CRC.
Rigby, R. A., D. M. Stasinopoulos, G. Z. Heller, and F. De Bastiani. 2019. <em>Distributions for Modeling Location, Scale, and Shape: Using <span>GAMLSS</span> in <span>R</span></em>. Boca Raton: Chapman &amp; Hall/CRC. <a href="https://doi.org/10.1201/9780429298547">https://doi.org/10.1201/9780429298547</a>.
</div>
<div id="ref-distregvis2019" class="csl-entry" role="listitem">
Stadlmann, S. 2019. <em>Distreg.vis: Framework for the Visualization of Distributional Regression Models</em>. <a href="https://doi.org/10.32614/CRAN.package.distreg.vis">https://doi.org/10.32614/CRAN.package.distreg.vis</a>.
Stadlmann, S. 2019. <em>Distreg.vis: Framework for the Visualization of Distributional Regression Models</em>. <a href="https://CRAN.R-project.org/package=distreg.vis">https://CRAN.R-project.org/package=distreg.vis</a>.
</div>
<div id="ref-Stasinopoulos2018" class="csl-entry" role="listitem">
Stasinopoulos, D. M., R. A. Rigby, and F. De Bastiani. 2018. <span><span>GAMLSS</span>: A Distributional Regression Approach.”</span> <em>Statistical Modelling</em> 18 (3-4): 248–73. <a href="https://doi.org/10.1177/1471082x18759144">https://doi.org/10.1177/1471082x18759144</a>.
Stasinopoulos, D. M., R. A. Rigby, and F. De Bastiani. 2018. <span><span>GAMLSS</span>: A Distributional Regression Approach.”</span> <em>Statistical Modelling</em> 18 (3-4): 248–73.
</div>
<div id="ref-Stasinopoulosetal2021" class="csl-entry" role="listitem">
Stasinopoulos, D. M., R. A. Rigby, N. Giorgikopoulos, and F. De Bastiani. 2022. <span>“Principal Component Regression in GAMLSS Applied to Greek-German Government Bond Yield Spreads.”</span> <em>Statistical Modelling</em> 22 (1-2): 127–45. <a href="https://doi.org/10.1177/1471082x211022980">https://doi.org/10.1177/1471082x211022980</a>.
</div>
<div id="ref-Stasinopoulosetal2017" class="csl-entry" role="listitem">
Stasinopoulos, D. M., R. A. Rigby, G. Z. Heller, V. Voudouris, and F. De Bastiani. 2017. <em>Flexible Regression and Smoothing: Using <span>GAMLSS</span> in <span>R</span></em>. Boca Raton: Chapman &amp; Hall/CRC. <a href="https://doi.org/10.1201/b21973">https://doi.org/10.1201/b21973</a>.
Stasinopoulos, D. M., R. A. Rigby, G. Z. Heller, V. Voudouris, and F. De Bastiani. 2017. <em>Flexible Regression and Smoothing: Using GAMLSS in r</em>. Boca Raton: Chapman &amp; Hall/CRC.
</div>
<div id="ref-stasinopoulos2023p" class="csl-entry" role="listitem">
Stasinopoulos, Dimitrios M, Robert A Rigby, Gillian Z Heller, and Fernanda De Bastiani. 2023. <span>“P-Splines and <span>GAMLSS</span>: <span>A</span> Powerful Combination, with an Application to Zero-Adjusted Distributions.”</span> <em>Statistical Modelling</em> 23 (5-6): 510–24. <a href="https://doi.org/10.1177/1471082x231176635">https://doi.org/10.1177/1471082x231176635</a>.
Stasinopoulos, Dimitrios M, Robert A Rigby, Gillian Z Heller, and Fernanda De Bastiani. 2023. <span>“P-Splines and GAMLSS: A Powerful Combination, with an Application to Zero-Adjusted Distributions.”</span> <em>Statistical Modelling</em> 23 (5-6): 510–24.
</div>
<div id="ref-stasinopoulos2024generalized" class="csl-entry" role="listitem">
Stasinopoulos, M. D., T. Kneib, N. Klein, A. Mayr, and G. Z Heller. 2024. <em>Generalized Additive Models for Location, Scale and Shape: A Distributional Regression Approach, with Applications</em>. Vol. 56. Cambridge University Press.
Expand Down
2 changes: 1 addition & 1 deletion vignettes/spatial.html
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ <h2 data-number="5" class="anchored" data-anchor-id="estimating-the-model"><span
*--------
n = 3494 df = 98.97 res.df = 3395.03
Deviance = 16484.181 Null Dev. Red. = 14.46%
AIC = 16682.1271 elapsed = 4.40sec</code></pre>
AIC = 16682.1271 elapsed = 4.35sec</code></pre>
</div>
</div>
<p>Model calibration is checked using histogram, Q-Q plot, wormplot etc.</p>
Expand Down
Binary file modified vignettes/spatial_files/figure-html/unnamed-chunk-7-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3061151

Please sign in to comment.