R 패키지 메타데이터와 수집 신호를 모아 봅니다.
첫 화면에서 판단해야 할 수집 신호를 먼저 배치합니다.
DESCRIPTION에서 감지한 backend 관련 package입니다.
기본 메타데이터를 작은 카드와 토큰으로 압축합니다.
| Package | Type | Spec |
|---|---|---|
| graphics CRAN · 3.1.0 · 2026-05-30 | Imports | graphics |
| lifecycle CRAN · 3.1.0 · 2026-05-30 | Imports | lifecycle (>= 1.0.0) |
| methods CRAN · 3.1.0 · 2026-05-30 | Imports | methods |
| statmod CRAN · 3.1.0 · 2026-05-30 | Imports | statmod (>= 1.4.0) |
| stats CRAN · 3.1.0 · 2026-05-30 | Imports | stats |
| knitr CRAN · 3.1.0 · 2026-05-30 | Suggests | knitr |
| rmarkdown CRAN · 3.1.0 · 2026-05-30 | Suggests | rmarkdown |
| testthat CRAN · 3.1.0 · 2026-05-30 | Suggests | testthat (>= 3.0.0) |
| 검색 결과가 없습니다. | ||
| Package | Type | Spec |
|---|---|---|
| assessor 1.3.1 CRAN · 2026-05-30 | Imports | tweedie |
| ChainLadder 0.2.21 CRAN · 2026-05-30 | Imports | tweedie |
| cplm 0.7-12.1 CRAN · 2026-05-30 | Imports | tweedie |
| ecoCopula 1.0.6 CRAN · 2026-05-30 | Imports | tweedie |
| GlmSimulatoR 1.0.0 CRAN · 2026-05-30 | Imports | tweedie |
| gratia 0.11.2 CRAN · 2026-05-30 | Imports | tweedie (>= 2.3.5) |
| mvabund 4.2.8 CRAN · 2026-05-30 | Imports | tweedie |
| SubTS 1.0 CRAN · 2026-05-30 | Imports | tweedie |
| bayestestR 0.18.1 CRAN · 2026-05-30 | Suggests | tweedie |
| clustTMB 0.1.0 CRAN · 2026-05-30 | Suggests | tweedie |
| dsm 2.3.4 CRAN · 2026-05-30 | Suggests | tweedie |
| fastglm 0.1.0 CRAN · 2026-05-30 | Suggests | tweedie |
| insight 1.5.1 CRAN · 2026-05-30 | Suggests | tweedie |
| ktweedie 1.0.3 CRAN · 2026-05-30 | Suggests | tweedie |
| mcglm 0.9.0 CRAN · 2026-05-30 | Suggests | tweedie |
| mvgam 1.1.594 CRAN · 2026-05-30 | Suggests | tweedie |
| mvtweedie 1.2.0 CRAN · 2026-05-30 | Suggests | tweedie |
| nnTensor 1.4.0 CRAN · 2026-05-30 | Suggests | tweedie |
| performance 0.17.0 CRAN · 2026-05-30 | Suggests | tweedie |
| raw 0.1.8 CRAN · 2026-05-30 | Suggests | tweedie |
| sspm 1.1.0 CRAN · 2026-05-30 | Suggests | tweedie |
| statmod 1.5.2 CRAN · 2026-05-30 | Suggests | tweedie |
| tinyVAST 1.6.0 CRAN · 2026-05-30 | Suggests | tweedie |
| 검색 결과가 없습니다. | ||
| Type | Packages |
|---|---|
| Imports | 8 |
| Suggests | 15 |
CRAN: tweedie citation info Dunn PK, Smyth GK (2005). “Series evaluation of Tweedie exponential dispersion models.” Statistics and Computing , 15 (4), 267-280. Dunn PK, Smyth GK (2008). “Evaluation of Tweedie exponential dispersion models using Fourier inversion.” Statistics and Computing , 18 (1), 73-86. Dunn PK (2026). Tweedie: Evaluation of Tweedie Exponential Family Models . R package version 3.0.19. Corresponding BibTeX entries: @Article{, author = {Peter K. Dunn and Gordon K. Smyth}, year = {2005}, title = {Series evaluation of Tweedie exponential dispersion models}, journal = {Statistics and Computing}, volume = {15}, number = {4}, pages = {267-280}, } @Article{, author = {Peter K. Dunn and Gordon K. Smyth}, year = {2008}, title = {Evaluation of Tweedie exponential dispersion models using Fourier inversion}, journal = {Statistics and Computing}, volume = {18}, number = {1}, pages = {73-86}, } @Manual{, author = {Peter K. Dunn}, year = {2026}, note = {R package version 3.0.19}, title = {Tweedie: Evaluation of Tweedie Exponential Family Models}, }NEWS code{white-space: pre-wrap;} span.smallcaps{font-variant: small-caps;} span.underline{text-decoration: underline;} div.column{display: inline-block; vertical-align: top; width: 50%;} div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} ul.task-list{list-style: none;} tweedie 3.0.19 (Release date: 2026-04-26) Changes: Improvements to tweedie_plot() and passing plotting options Fix error with accelerate when returning early: return properly (Thanks Jeonghwan Lee) tweedie 3.0.17 (Release date: 2026-02-26) Changes: Fixed an error with xi = 1 and phi in qtweedie (thanks Milan Bouchet-Valat). Added a test to prevent this again. Relocated hex.R and fixed the hex-producing script. Fix Makefile. tweedie 3.0.14 (Release date: 2026-02-16) Changes: Improved the vignette. Some internal renaming. Fix some xi = 1 cases (thanks Milan Bouchet-Valat). Relocate some messages in tweedie_profile(). Add poison example to vignette. tweedie 3.0.12 (Release date: 2026-02-07) Changes: Trying to fix bugs that pop up (seemingly at random) with rhub etc. checks. tweedie 3.0.5 (Release date: 2026-01-30) Changes: FORTRAN code restructured to make the similar flow in the three zones (initial; pre-acceleration; acceleration) clearer Some fixes to documentation to pass tests. Some minor fixes to R code. tweedie 3.0.4 (Release date: 2026-01-20) Changes: Some fixes to implementation of IGexact tweedie 3.0.3 (Release date: 2025-11-29) Changes: Add IGexact for [dp]tweedie_inversion: whether to use exact values or inversion when p = 3. Fixed some comments tweedie 3.0.2 (Release date: 2025-11-29) Changes: All code moved from FORTRAN77 to FORTRAN90. Almost no FORTRAN code remains from version < 3. PDF and CDF computations consolidated and code shared where possible, substantially reducing the amount of FORTRAN code. Separated FORTRAN code into different files for easier debugging. Improvements to the acceleration algorithm and root-finding algorithms, so should work better for more cases. Added verbose (shows what’s happening behind the scenes) and details (reports on the fitting) as options for many user-facing R functions. Added ptweedie_inversion() to the man page for dtweedie. Tidied the man pages; added examples. Removed the almost-never used dtweedie.stable() function. Changed function names (e.g, tweedie.convert() to tweedie_convert()). Separated R functions into separate files depending on purpose (e.g., dtweedie.R and ptweedie.R). Moved the tweedie_Extra files into the main package. dtweedie.igrand() (now tweedie_igrand()) to plot the integrand for the DF also. tweedie 2.3.5 (Release date: 2022-08-17) Changes: Added outputs gamma.mean and gamma.phi to tweedie.convert() Added more error checks to tweedie.convert() to prevent a model being provided Minor edits tweedie 2.3.1 (Release date: 2017-11-15) Changes: Updated ptweedie.series() to fix a bug (reported by Lu Yang), where incorrect answers could sometimes be returned. Other minor fixes tweedie 2.3.0 (Release date: 2017-11-06) Changes: Fixed an issue with AICtweedie(), where the incorrect AIC was given when prior weights used (reported by David Scollnik) Fixed a compilation error (in the subroutine smallp(), where variables were declared as initialised (thanks to Iñaki Úcar i.ucar86@gmail.com ) Other minor edits. tweedie 2.2.10 (Release date: 2017-08-23) Changes: Kept it even more quiet tweedie 2.2.6 (Release date: 2017-08-22) Changes: Fixed tweedie.f() to keep it quiet more often (sometimes, diagnostic reports meant for internal monitoring, were printed) Fixed a problem reported by Gustavo Lacerda, where ptweedie() returned NaN As a result, the series is now used in far more cases when 1<xi<2 for ptweedie() Changed rtweedie() algorithm for the case 1 < xi < 2 (thanks to Carlos J. Gil Bellosta) New function tweedie.convert() added tweedie 2.2.5 (Release date: 2016-12-19) Changes: Added CITATION file Fixed an issue where the Tweedie cdf could return a value greater than one (reported by Jeremie Juste) Minor tidy of FORTRAN code Minor tidies in R code tweedie 2.1.9 (Release date: 2014-06-06) Changes: Some administrative fixes for CRAN tweedie 2.1.8 (Release date: 2013-09-10) Changes: Fixed an issue where ptweedie() would fail for very small y; set this to 0 when y<1.0e-300 (based on a report by Johann Cuenin) tweedie 2.1.7 (Release date: 2013-01-15) Changes: Admin release (e.g. .First.lib() removed) Some minor edits to manual Added the control input to tweedie.profile() (thanks to Giri Khageswor, DPI Victoria) Minor fixes in the manual tweedie 2.1.5 (Release date: 2012-11-01) Changes: Changed the example in tweedie-package to execute faster (CRAN requirement) tweedie 2.1.4 (Release date: 2012-10-31) Changes: Fixed an error in dtweedie() that reported NA in the case when power=1 and phi != 1 (thanks to Dina Farkas) [dqpr]stable now in package stabledist rather then fBasics; fixed Fixed some typos in the help for tweedie-package (thanks to Peng Yu) rtweedie() reported an error if power = 1; fixed (thanks for Peng Yu) Edits to conform with new first argument of .Fortran (i.e. .NAME rather than name) Added NAMESPACE tweedie 2.1.0 (Release date: 2011-06-09) Changes: Changed tweedie.profile() to ignore values of p/xi outside (1, 2) rather than report an error. In some unusual cases, when p/xi = 0 was used (with add0 = TRUE), the mle of p was between 0 and 1 (which is impossible). We report a warning message to check the data and the call to tweedie.profile(), but then set the mle to the value of p/xi giving the larger value of the likelihood Made the functions usually called by users able to accept xi or power A few minor edits to FORTRAN code; some variables not declared tweedie 2.0.8 (Release date: 2011-06-08) Changes: Minor fixes to documentation Fixed the add0 input Some minor changes to the code to tidy up adding the zero If values of xi/p are given between 0 and 1, or less than 0, they are now omitted (with a message) rather than creating an error. If there are no values left after omitting the problem value, an error message is given. tweedie 2.0.7 (Release date: 2010-09-30) Changes: Ensured tweedie.profile() does not use power = 1. This case (power=1 and phi not equal to 1) is too hard for me to deal with at present. Fixed an error introduced in version 2.0.5, where the value of xi.vec/p.vec was set to 1.2 (y >= 0) or 1.5 (y > 0) when not explicitly specified Fixed an error that reported the wrong mle of phi when the mle occurred at an endpoint of the given xi values. tweedie 2.0.5 (Release date: 2010-08-27) Changes: Change to dtweedie.inversion() to ensure density = 0 is returned when y < 0 (1 < p < 2) or p <- 0 (when p > 2) Change to tweedie.profile() to fix a problem that p = 1 returned an error Changed so that tweedie.profile() works with p/xi = 0 when add0=TRUE (default is FALSE) Fixed some minor outputting messages (when verbose == 2) Location of CITATION file moved to correct location tweedie 2.0.4 (Release date: 2010-07-12) Changes: Minor edits tweedie 2.0.3 (Release date: 2009-12-18) Changes: Changed default p.vec: There were too many values Added the facility to refer to p as xi in line with GLMs text tweedie 2.0.1 (Release date: 2009-11-17) Changes: Changed the default p.vec when 1 < p < 2 to seq(1.2, 1.8, by = 0.05) (it was seq(1.2, 1.8, by = 0.1) ) Slightly changed default output (added sep = “” to some paste commands) Added AICtweedie() to compute AIC for Tweedie glms tweedie 2.0.0 (Release date: 2009-08-10) Changes: Made method = “inversion” the default (was “series”) Slightly changed default output (added sep = “” to some paste commands) An error introduced earlier (unsure when exactly; prob v 1.6.1) In trying to identify and fix the error, tidied some of the FORTRAN code Made do.smooth = TRUE the default (was FALSE) If p.vec is not supplied, tweedie.profile() makes a sensible guess Made verbose = FALSE the default (was TRUE) Made minor changes to output when verbose = FALSE tweedREADME code{white-space: pre-wrap;} span.smallcaps{font-variant: small-caps;} span.underline{text-decoration: underline;} div.column{display: inline-block; vertical-align: top; width: 50%;} div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} ul.task-list{list-style: none;} pre > code.sourceCode { white-space: pre; position: relative; } pre > code.sourceCode > span { display: inline-block; line-height: 1.25; } pre > code.sourceCode > span:empty { height: 1.2em; } .sourceCode { overflow: visible; } code.sourceCode > span { color: inherit; text-decoration: inherit; } div.sourceCode { margin: 1em 0; } pre.sourceCode { margin: 0; } @media screen { div.sourceCode { overflow: auto; } } @media print { pre > code.sourceCode { white-space: pre-wrap; } pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; } } pre.numberSource code { counter-reset: source-line 0; } pre.numberSource code > span { position: relative; left: -4em; counter-increment: source-line; } pre.numberSource code > span > a:first-child::before { content: counter(source-line); position: relative; left: -1em; text-align: right; vertical-align: baseline; border: none; display: inline-block; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; padding: 0 4px; width: 4em; color: #aaaaaa; } pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; } div.sourceCode { } @media screen { pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; } } code span.al { color: #ff0000; font-weight: bold; } /* Alert */ code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */ code span.at { color: #7d9029; } /* Attribute */ code span.bn { color: #40a070; } /* BaseN */ code span.bu { color: #008000; } /* BuiltIn */ code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */ code span.ch { color: #4070a0; } /* Char */ code span.cn { color: #880000; } /* Constant */ code span.co { color: #60a0b0; font-style: italic; } /* Comment */ code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */ code span.do { color: #ba2121; font-style: italic; } /* Documentation */ code span.dt { color: #902000; } /* DataType */ code span.dv { color: #40a070; } /* DecVal */ code span.er { color: #ff0000; font-weight: bold; } /* Error */ code span.ex { } /* Extension */ code span.fl { color: #40a070; } /* Float */ code span.fu { color: #06287e; } /* Function */ code span.im { color: #008000; font-weight: bold; } /* Import */ code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */ code span.kw { color: #007020; font-weight: bold; } /* Keyword */ code span.op { color: #666666; } /* Operator */ code span.ot { color: #007020; } /* Other */ code span.pp { color: #bc7a00; } /* Preprocessor */ code span.sc { color: #4070a0; } /* SpecialChar */ code span.ss { color: #bb6688; } /* SpecialString */ code span.st { color: #4070a0; } /* String */ code span.va { color: #19177c; } /* Variable */ code span.vs { color: #4070a0; } /* VerbatimString */ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */ tweedie The tweedie package allows likelihood computations for Tweedie distributions. Apart from special cases (the normal, Poisson, gamma, inverse Gaussian distributions), Tweedie distributions do not have closed-form density functions or distribution functions. This package uses fast numerical algorithms (infinite oscillation integrals; infinite series) to evaluate the Tweedie density functions and distribution functions. Installation You can install the development version of tweedie from GitHub with: # install.packages("pak") pak :: pak ( "PeterKDunn/tweedie" ) Tweedie distributions Tweedie distributions are exponential dispersion models, with a mean \(\mu\) and a variance \(\phi \mu^\xi\) , for some dispersion parameter \(\phi > 0\) and a power index \(\xi\) (sometimes called \(p\) ) that uniquely defines the distribution within the Tweedie family (for all real values of \(\xi\) not between 0 and 1). Special cases of the Tweedie distributions are: the normal distribution, with \(\xi = 0\) (i.e., the variance is \(\phi\) and not related to the mean); the Poisson distribution, with \(\xi = 1\) and \(\phi = 1\) (i.e., the variance is the same as the mean); the gamma distribution, with \(\xi = 2\) ; and the inverse Gaussian distribution, with \(\xi = 3\) . For all other values of \(\xi\) , the probability functions and distribution functions have no closed forms. For \(\xi < 1\) , applications are limited (non-existent so far?), but have support on the entire real line and \(\mu > 0\) . For \(1 < \xi < 2\) , Tweedie distributions can be represented as a Poisson sum of gamma distributions. These distributions are continuous for \(Y > 0\) but have a discrete mass at \(Y = 0\) . For \(\xi \ge 2\) , the distributions have support on the positive reals. The vignette contains examples.Help for package tweedie const macros = { "\\R": "\\textsf{R}", "\\mbox": "\\text", "\\code": "\\texttt"}; function processMathHTML() { var l = document.getElementsByClassName('reqn'); for (let e of l) { katex.render(e.textContent, e, { throwOnError: false, macros }); } return; } Package {tweedie} Contents tweedie-package Tweedie dtweedie_inversion dtweedie_saddle dtweedie_series logLiktweedie ptweedie_inversion ptweedie_series tweedie_AIC tweedie_convert tweedie_dev tweedie_integrand tweedie_lambda tweedie_plot tweedie_profile Version: 3.0.19 Date: 2026-04-26 Title: Evaluation of Tweedie Exponential Family Models Depends: R (≥ 2.8.0) Encoding: UTF-8 Imports: methods, stats, graphics, lifecycle (≥ 1.0.0), statmod (≥ 1.4.0) Suggests: knitr, rmarkdown, testthat (≥ 3.0.0) Description: Maximum likelihood computations for Tweedie families, including the series expansion (Dunn and Smyth, 2005; < doi:10.1007/s11222-005-4070-y >) and the Fourier inversion (Dunn and Smyth, 2008; < doi:10.1007/s11222-007-9039-6 >), and related methods. License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] NeedsCompilation: yes RoxygenNote: 7.3.3 Config/testthat/edition: 3 VignetteBuilder: knitr Packaged: 2026-04-21 22:24:46 UTC; peterd Author: Peter K. Dunn [cre, aut] Maintainer: Peter K. Dunn <pdunn2@usc.edu.au> Repository: CRAN Date/Publication: 2026-04-22 07:00:02 UTC Evaluation of Tweedie Exponential Family Models Description This package provides maximum likelihood computations for Tweedie families, including the series expansion (Dunn and Smyth, 2005) and the Fourier inversion (Dunn and Smyth, 2008), and related methods. Author(s) Maintainer : Peter K. Dunn pdunn2@usc.edu.au Tweedie distributions Description Density, distribution function, quantile function and random generation for the the Tweedie family of distributions, with mean mu , dispersion parameter phi and variance power power (or xi , a synonym for power ). Usage dtweedie(y, xi = NULL, mu, phi, power = NULL, verbose = FALSE) ptweedie(q, xi = NULL, mu, phi, power = NULL, verbose = FALSE) qtweedie(p, xi = NULL, mu, phi, power = NULL) rtweedie(n, xi = NULL, mu, phi, power = NULL) ptweedie(q, xi = NULL, mu, phi, power = NULL, verbose = FALSE) qtweedie(p, xi = NULL, mu, phi, power = NULL) rtweedie(n, xi = NULL, mu, phi, power = NULL) Arguments y vector of quantiles. xi scalar; the value of \xi such that the variance is \mbox{var}[Y]=\phi\mu^{\xi} . A synonym for power . mu vector of mean \mu . phi vector of dispersion parameters \phi . power scalar; a synonym for \xi , the Tweedie index parameter. verbose logical; if TRUE , some details of the algorithms used is shown. The default is FALSE . q vector of quantiles. p vector of probabilities. n number of observations. Details The Tweedie edm s belong to the class of exponential dispersion models ( edm s), known for their role in generalized linear models ( glm s). The Tweedie distributions are the edm s with a variance of the form \mbox{var}[Y] = \phi\mu^p where p \ge 1 . This function only evaluates for p \ge 1 . Special cases are the Poisson ( p = 1 with \phi = 1 ), gamma ( p = 2 ), and inverse Gaussian ( p = 3 ) distributions. Evaluation is difficult for p outside of p = 0, 1, 2, 3 . This function uses one of two primary methods, depending on the combination of parameters: Evaluation of an infinite series ( dtweedie_series ). Interpolation from stored values computed via a Fourier inversion technique ( dtweedie_inversion ). This function employs a two-dimensional interpolation procedure to compute the density for some parts of the parameter space from previously computed values (interpolation) and uses the series solution for others. When 1<p<2 , the density function include a positive probably for Y = 0 . Value dtweedie gives the density, ptweedie gives the distribution function, qtweedie gives the quantile function, and rtweedie generates random deviates. The length of the result is determined by n for rtweedie , and by the length of mu for other functions. Note dtweedie and ptweedie are the only functions generally to be called by users. Consequently, all checks on the function inputs are performed in these functions. References Dunn, P. K. and Smyth, G. K. (2008). Evaluation of Tweedie exponential dispersion model densities by Fourier inversion. Statistics and Computing , 18 , 73–86. doi:10.1007/s11222-007-9039-6 Dunn, Peter K and Smyth, Gordon K (2005). Series evaluation of Tweedie exponential dispersion model densities Statistics and Computing , 15 (4). 267–280. doi:10.1007/s11222-005-4070-y Jorgensen, B. (1997). Theory of Dispersion Models . Chapman and Hall, London. See Also dtweedie_series , dtweedie_inversion , ptweedie_series , ptweedie_inversion , dtweedie_saddle , tweedie_lambda Examples # Compute a Tweedie density power <- 1.1 mu <- 1 phi <- 1 y <- seq(0, 5, by = 0.5) dtweedie(y, power = power, mu = mu, phi = phi) # Compare to the saddlepoint density dtweedie_saddle(y = y, power = power, mu = mu, phi = phi) # The DF: ptweedie(y, power = power, mu = mu, phi = phi) Fourier Inversion Evaluation for the Tweedie Probability Function Description Evaluates the probability density function ( pdf ) for Tweedie distributions using Fourier inversion, for given values of the dependent variable y , the mean mu , dispersion phi , and power parameter power . Not usually called by general users , but can be used in the case of evaluation problems. Usage dtweedie_inversion(y, mu, phi, power, method = 3, verbose = FALSE, details = FALSE, IGexact = TRUE) dtweedie.inversion(y, power, mu, phi, method = 3, verbose, details) Arguments y vector of quantiles. mu the mean parameter \mu . phi the dispersion parameter \phi . power scalar; the power parameter p . method the method to use; one of 1 , 2 , or 3 (the default). verbose logical; if TRUE , display some internal computation details. The default is FALSE . details logical; if TRUE , return a list with basic details of the integration. The default is FALSE . IGexact logical; if TRUE (the default), evaluate the inverse Gaussian distribution using the 'exact' values, otherwise uses inversion. Value A numeric vector of densities if details=FALSE ; if details = TRUE , a list containing denisty (a vector of the values of the density), regions (a vector of the number of integration regions used), method (a vector giving the evaluation method used; see the Note below on the three methods), and exitstatus (a vector, where a 1 for any value means a computational problem or target relative accuracy not reached, for the corresponding observation). Note The 'exact' values for the inverse Gaussian distribution are not really exact, but evaluated using inverse normal distributions, for which very good numerical approximation are available in R. For special cases of p (i.e., p = 0, 1, 2, 3 ), where no inversion is needed, regions and method are set to NA for all values of y . For special cases of y for other values of p (i.e., P(Y = 0) ), regions and method are set to NA . The three methods are described in Dunn & Smyth (2008). References Dunn, P. K. and Smyth, G. K. (2008). Evaluation of Tweedie exponential dispersion model densities by Fourier inversion. Statistics and Computing , 18 , 73–86. doi:10.1007/s11222-007-9039-6 Dunn, P. K. and Smyth, G. K. (2008). Evaluation of Tweedie exponential dispersion model densities by Fourier inversion. Statistics and Computing , 18 , 73–86. doi:10.1007/s11222-007-9039-6 Examples # Plot a Tweedie density y <- seq(0.02, 4, length = 50) fy <- dtweedie_inversion(y, mu = 1, phi = 1, power = 1.1) plot(y, fy, type = "l", lwd = 2, ylab = "Density") Tweedie densities evaluation using the saddlepoint approximation Description Density function for the Tweedie EMDs using a saddlepoint approximation. Usage dtweedie_saddle(y, xi = NULL, mu, phi, eps = 1/6, power = NULL) dtweedie.saddle(y, xi = NULL, mu, phi, eps = 1/6, power = NULL) Arguments y vector of quantiles. xi scalar; the value of \xi suDensity, distribution function, quantile function and random generation for the the Tweedie family of distributions, with mean mu, dispersion parameter phi and variance power power (or xi, a synonym for power).
dtweedie(y, xi = NULL, mu, phi, power = NULL, verbose = FALSE) ptweedie(q, xi = NULL, mu, phi, power = NULL, verbose = FALSE) qtweedie(p, xi = NULL, mu, phi, power = NULL) rtweedie(n, xi = NULL, mu, phi, power = NULL) ptweedie(q, xi = NULL, mu, phi, power = NULL, verbose = FALSE) qtweedie(p, xi = NULL, mu, phi, power = NULL) rtweedie(n, xi = NULL, mu, phi, power = NULL)# Compute a Tweedie density power <- 1.1 mu <- 1 phi <- 1 y <- seq(0, 5, by = 0.5) dtweedie(y, power = power, mu = mu, phi = phi) # Compare to the saddlepoint density dtweedie_saddle(y = y, power = power, mu = mu, phi = phi) # The DF: ptweedie(y, power = power, mu = mu, phi = phi)Evaluates the probability density function (pdf) for Tweedie distributions using Fourier inversion, for given values of the dependent variable y, the mean mu, dispersion phi, and power parameter power. Not usually called by general users, but can be used in the case of evaluation problems.
dtweedie_inversion(y, mu, phi, power, method = 3, verbose = FALSE, details = FALSE, IGexact = TRUE) dtweedie.inversion(y, power, mu, phi, method = 3, verbose, details)# Plot a Tweedie density y <- seq(0.02, 4, length = 50) fy <- dtweedie_inversion(y, mu = 1, phi = 1, power = 1.1) plot(y, fy, type = "l", lwd = 2, ylab = "Density")Density function for the Tweedie EMDs using a saddlepoint approximation.
dtweedie_saddle(y, xi = NULL, mu, phi, eps = 1/6, power = NULL) dtweedie.saddle(y, xi = NULL, mu, phi, eps = 1/6, power = NULL)# Plot a Tweedie density y <- seq(0.01, 4, length = 50) fy <- dtweedie_saddle(y, power = 1.1, mu = 1, phi = 1) plot(y, fy, type = "l", lwd = 2, ylab = "Density")Evaluates the probability density function (pdf) for Tweedie distributions using an infinite series, for given values of the dependent variable y, the mean mu, dispersion phi, and power parameter power. Not usually called by general users, but can be used in the case of evaluation problems.
dtweedie_series(y, power, mu,phi) dtweedie.series(y, power, mu, phi)# Plot a Tweedie density y <- seq(0.01, 4, length = 50) fy <- dtweedie_series(y, power = 1.1, mu = 1, phi = 1) plot(y, fy, type = "l", lwd = 2, ylab = "Density")Evaluates the log-likelihood for a fitted Tweedie glm.
logLiktweedie(glm.obj, dispersion = NULL)# Fit a Tweedie density using tweedie family function from statmod pretend <- data.frame( y = stats::rgamma(20, shape = 1, rate = 1) ) fit <- glm(y ~ 1, data = pretend, family = statmod::tweedie(link.power = 0, var.power = 2.1)) # Compute the AIC logLiktweedie(fit)Evaluates the distribution function (df) for Tweedie distributions using Fourier inversion, for given values of the dependent variable y, the mean mu, dispersion phi, and power parameter power. Not usually called by general users, but can be in the case of evaluation problems.
ptweedie_inversion(q, mu, phi, power, verbose = FALSE, details = FALSE, IGexact = TRUE) ptweedie.inversion(q, power, mu, phi, verbose, details)# Plot a Tweedie distribution function y <- seq(0.01, 4, length = 50) Fy <- ptweedie_inversion(y, mu = 1, phi = 1, power = 1.1) plot(y, Fy, type = "l", lwd = 2, ylab = "Distribution function")Evaluates the distribution function (df) for Tweedie distributions with 1 < p < 21 < p < 2 using an infinite series, for given values of the dependent variable y, the mean mu, dispersion phi, and power parameter power. Not usually called by general users, but can be in the case of evaluation problems.
ptweedie_series(q, power, mu, phi, verbose = FALSE, details = FALSE) ptweedie.series(q, power, mu, phi, verbose = FALSE, details = FALSE)# Plot a Tweedie distribution function y <- seq(0.01, 4, length = 50) Fy <- ptweedie_series(y, power = 1.1, mu = 1, phi = 1) plot(y, Fy, type = "l", lwd = 2, ylab = "Distribution function")This package provides maximum likelihood computations for Tweedie families, including the series expansion (Dunn and Smyth, 2005) and the Fourier inversion (Dunn and Smyth, 2008), and related methods.
Evaluates the aic for a fitted Tweedie glm. The Tweedie family of distributions belong to the class of exponential dispersion models (edms), famous for their role in generalized linear models. The Tweedie distributions are the edms with a variance of the form var[Y] = ^pvar[Y] = phi*mu^p where p 1p >= 1. This function only evaluates for p 1p >= 1.
tweedie_AIC(glm.obj, dispersion = NULL, k = 2, verbose = TRUE) AICtweedie(glm.obj, dispersion = NULL, k = 2, verbose = TRUE)# Fit a Tweedie density using tweedie family function from statmod pretend <- data.frame( y = stats::rgamma(20, shape = 1, rate = 1) ) fit <- glm(y ~ 1, data = pretend, family = statmod::tweedie(link.power = 0, var.power = 2.1)) # Compute the AIC tweedie_AIC(fit)Converts from the fitted glm parameters p, mu and phi and the corresponding underlying Poisson and gamma parameters (when 1 < p < 2).
tweedie_convert(xi = NULL, mu, phi, power = NULL) tweedie.convert(xi = NULL, mu, phi, power = NULL)### Fit a Tweedie density pretend <- data.frame( y = rgamma(20, shape = 1, rate = 1) ) fit <- glm(y ~ 1, data = pretend, family = statmod::tweedie(link.power = 0, var.power = 1.4)) # Convert parameters tweedie_convert(mu = fitted(fit, type="response"), phi = 1, power = 1.4)Computes the unit deviance for Tweedie distributions.
tweedie_dev(y, mu, power) tweedie.dev(y, mu, power)# Unit deviance is not symmetric in general: round( tweedie_dev(0:6, mu = 3, power = 1.1), 3)Plots the integrand for Fourier inversion and the real and imaginary parts separately.
tweedie_integrand(y, power, mu, phi, t = seq(0, 5, length = 200), type = "PDF", whichPlots = 1:4, yLimits = NULL)tweedie_integrand(2, power = 3, mu = 1, phi = 1)The probability that the variable takes the value of zero.
tweedie_lambda(mu, phi, power)lambda <- tweedie_lambda(mu = 1:3, phi = 1, power = 1.1) exp( -lambda) # When p > 2, there is zero probability that Y = 0: lambda <- tweedie_lambda(mu = 1, phi = 1, power = 3.1)This function produced a plot of the specified Tweedie distribution.
tweedie_plot(y, xi = NULL, mu, phi, type = "pdf", power = NULL, add = FALSE, ...) tweedie.plot( y, xi = NULL, mu, phi, type = "pdf", power = NULL, add = FALSE, ... )y <- seq(0, 4, length = 50) tweedie_plot(y, power = 1.1, mu = 1, phi = 1)This function profiles the (log-)likelihood over a vector of Tweedie power-index parameter (denoted ppower or xi) to find the maximum likelihood estimate (MLE) of the index parameter p (or equivalently xi).
tweedie_profile(formula, p.vec = NULL, xi.vec = NULL, link.power = 0, data, weights = 1, offset = 0, fit.glm = FALSE, do.smooth = TRUE, do.plot = FALSE, do.ci = do.smooth, eps = 1/6, control = list( epsilon = 1e-09, maxit = stats::glm.control()$maxit, trace = glm.control()$trace ), do.points = do.plot, method = "inversion", conf.level = 0.95, phi.method = ifelse(method == "saddlepoint", "saddlepoint", "mle"), verbose = FALSE, add0 = FALSE) tweedie.profile( formula, p.vec = NULL, xi.vec = NULL, link.power = 0, data, weights = 1, offset = 0, fit.glm = FALSE, do.smooth = TRUE, do.plot = FALSE, do.ci = do.smooth, eps = 1/6, control = list(epsilon = 1e-09, maxit = stats::glm.control()$maxit, trace = glm.control()$trace), do.points = do.plot, method = "inversion", conf.level = 0.95, phi.method = ifelse(method == "saddlepoint", "saddlepoint", "mle"), verbose = FALSE, add0 = FALSE )data(rock) out <- tweedie_profile(perm~1, data=rock, do.plot=FALSE, xi.vec=seq(1.5, 2.75, length=11)) # The estimate for the variance power index (p, or xi) is: out$p.max| Repository | Version | Published | First seen | Last seen | Docs |
|---|---|---|---|---|---|
| CRAN | 3.1.0 | 2026-05-29 | 2026-05-30 | ||
| CRAN | 3.0.19 | 2026-05-19 | 2026-05-19 |
표시할 OSV 데이터가 없습니다.
표시할 OpenAlex 데이터가 없습니다.