tweedie

R 패키지 메타데이터와 수집 신호를 모아 봅니다.

Packages / CRAN / tweedie

tweedie

v3.1.0
Repository CRANLicense GPL (>= 2)Lifecycle activeNeeds compilation yes
DOI
10.32614/CRAN.package.tweedie
Task views
Actuarial Science, Probability Distributions
Reverse imports
310

Core Signals

첫 화면에서 판단해야 할 수집 신호를 먼저 배치합니다.

2
Task views
Actuarial Science, Probability Distributions
Reverse imports
310

Supported Backends

DESCRIPTION에서 감지한 backend 관련 package입니다.

0
backend package 신호가 없습니다.

Quick Facts

기본 메타데이터를 작은 카드와 토큰으로 압축합니다.

profile
Repository
CRAN
Version
3.1.0
License
GPL (>= 2)
Lifecycle
active
Needs compilation
yes
Reverse imports
310
Last observed
2026-05-30
CRAN
cran.r-project.org/package=tweedie

수집 소스별 패키지 정보

1개 소스
CRAN
3.1.0
2026-05-30
License
GPL (>= 2)
Depends
R (>= 2.8.0)
Imports
methods, stats, graphics, lifecycle (>= 1.0.0), statmod (>= 1.4.0)
Suggests
knitr, rmarkdown, testthat (>= 3.0.0)
Needs compilation
yes
Reverse imports
310
Lifecycle
active
Last observed
2026-05-30 10:45:11

이 패키지가 의존하는 패키지

5개 표시전체 8개
PackageTypeSpec
graphics
CRAN · 3.1.0 · 2026-05-30
Importsgraphics
lifecycle
CRAN · 3.1.0 · 2026-05-30
Importslifecycle (>= 1.0.0)
methods
CRAN · 3.1.0 · 2026-05-30
Importsmethods
statmod
CRAN · 3.1.0 · 2026-05-30
Importsstatmod (>= 1.4.0)
stats
CRAN · 3.1.0 · 2026-05-30
Importsstats
1 / 2

이 패키지를 쓰는 패키지

5개 표시전체 23개
PackageTypeSpec
assessor
1.3.1
CRAN · 2026-05-30
Importstweedie
ChainLadder
0.2.21
CRAN · 2026-05-30
Importstweedie
cplm
0.7-12.1
CRAN · 2026-05-30
Importstweedie
ecoCopula
1.0.6
CRAN · 2026-05-30
Importstweedie
GlmSimulatoR
1.0.0
CRAN · 2026-05-30
Importstweedie
1 / 5

Reverse dependency summary

2 types
TypePackages
Imports8
Suggests15

패키지 페이지

Reverse imports
16
Reverse suggests
30
All links
54
Repository
CRAN
Version
3.1.0
Collected
2026-05-20 03:38:30
Package page
https://cran.r-project.org/web/packages/tweedie/index.html
DOI
10.32614/CRAN.package.tweedie
Citation
https://cran.r-project.org/web/packages/tweedie/citation.html
CRAN checks
https://cran.r-project.org/web/checks/check_results_tweedie.html
README
https://cran.r-project.org/web/packages/tweedie/readme/README.html
NEWS
https://cran.r-project.org/web/packages/tweedie/news/news.html
Reference HTML
https://cran.r-project.org/web/packages/tweedie/refman/tweedie.html
Reference PDF
https://cran.r-project.org/web/packages/tweedie/tweedie.pdf
Source package
https://cran.r-project.org/src/contrib/tweedie_3.1.0.tar.gz
Archive
https://CRAN.R-project.org/src/contrib/Archive/tweedie
In views
ActuarialScienceDistributions
Page fields
Author
Peter K. Dunn [cre, aut]
CRAN Checks
tweedie results
Citation
tweedie citation info
DOI
10.32614/CRAN.package.tweedie
In Views
ActuarialScience , Distributions
License
GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
Maintainer
Peter K. Dunn <pdunn2 at usc.edu.au>
Materials
README , NEWS
NeedsCompilation
yes
Old Sources
tweedie archive
Package Source
tweedie_3.1.0.tar.gz
Published
2026-05-19
Reference Manual
tweedie.html , tweedie.pdf
Reverse Imports
assessor , ChainLadder , cplm , ecoCopula , GlmSimulatoR , gratia , mvabund , SubTS
Reverse Suggests
bayestestR , clustTMB , dsm , fastglm , insight , ktweedie , mcglm , mvgam , mvtweedie , nnTensor , performance , raw , sspm , statmod , tinyVAST
Version
3.1.0
Vignettes
tweedie ( source , R code )
Windows Binaries
r-devel: tweedie_3.0.19.zip , r-release: tweedie_3.0.19.zip , r-oldrel: tweedie_3.0.19.zip
MacOS Binaries
r-release (arm64): tweedie_3.0.19.tgz , r-oldrel (arm64): tweedie_3.0.19.tgz , r-release (x86_64): tweedie_3.0.19.tgz , r-oldrel (x86_64): tweedie_3.0.19.tgz
Version
3.1.0
Published
2026-05-19
DOI
10.32614/CRAN.package.tweedie
Author
Peter K. Dunn [cre, aut]
Maintainer
Peter K. Dunn <pdunn2 at usc.edu.au>
License
GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
NeedsCompilation
yes
Citation
tweedie citation info
Materials
README , NEWS
In Views
ActuarialScience , Distributions
CRAN Checks
tweedie results
Reference Manual
tweedie.html , tweedie.pdf
Vignettes
tweedie ( source , R code )
Package Source
tweedie_3.1.0.tar.gz
Windows Binaries
r-devel: tweedie_3.0.19.zip , r-release: tweedie_3.0.19.zip , r-oldrel: tweedie_3.0.19.zip
MacOS Binaries
r-release (arm64): tweedie_3.0.19.tgz , r-oldrel (arm64): tweedie_3.0.19.tgz , r-release (x86_64): tweedie_3.0.19.tgz , r-oldrel (x86_64): tweedie_3.0.19.tgz
Old Sources
tweedie archive
Reverse Imports
assessor , ChainLadder , cplm , ecoCopula , GlmSimulatoR , gratia , mvabund , SubTS
Reverse Suggests
bayestestR , clustTMB , dsm , fastglm , insight , ktweedie , mcglm , mvgam , mvtweedie , nnTensor , performance , raw , sspm , statmod , tinyVAST
Page sections 4
Documentation
Heading
Documentation
Links
[{"label":"tweedie.html","section":"","type":"","url":"https://cran.r-project.org/web/packages/tweedie/refman/tweedie.html"},{"label":"tweedie.pdf","section":"","type":"","url":"https://cran.r-project.org/web/packages/tweedie/tweedie.pdf"},{"label":"tweedie","section":"","type":"","url":"https://cran.r-project.org/web/packages/tweedie/vignettes/tweedie.html"},{"label":"source","section":"","type":"","url":"https://cran.r-project.org/web/packages/tweedie/vignettes/tweedie.Rmd"},{"label":"R code","section":"","type":"","url":"https://cran.r-project.org/web/packages/tweedie/vignettes/tweedie.R"}]
Text
Reference manual: tweedie.html , tweedie.pdf Vignettes: tweedie ( source , R code )
Downloads
Heading
Downloads
Links
[{"label":"tweedie_3.1.0.tar.gz","section":"","type":"","url":"https://cran.r-project.org/src/contrib/tweedie_3.1.0.tar.gz"},{"label":"tweedie_3.0.19.zip","section":"","type":"","url":"https://cran.r-project.org/bin/windows/contrib/4.7/tweedie_3.0.19.zip"},{"label":"tweedie_3.0.19.zip","section":"","type":"","url":"https://cran.r-project.org/bin/windows/contrib/4.6/tweedie_3.0.19.zip"},{"label":"tweedie_3.0.19.zip","section":"","type":"","url":"https://cran.r-project.org/bin/windows/contrib/4.5/tweedie_3.0.19.zip"},{"label":"tweedie_3.0.19.tgz","section":"","type":"","url":"https://cran.r-project.org/bin/macosx/sonoma-arm64/contrib/4.6/tweedie_3.0.19.tgz"},{"label":"tweedie_3.0.19.tgz","section":"","type":"","url":"https://cran.r-project.org/bin/macosx/big-sur-arm64/contrib/4.5/tweedie_3.0.19.tgz"},{"label":"tweedie_3.0.19.tgz","section":"","type":"","url":"https://cran.r-project.org/bin/macosx/big-sur-x86_64/contrib/4.6/tweedie_3.0.19.tgz"},{"label":"tweedie_3.0.19.tgz","section":"","type":"","url":"https://cran.r-project.org/bin/macosx/big-sur-x86_64/contrib/4.5/tweedie_3.0.19.tgz"},{"label":"tweedie archive","section":"","type":"","url":"https://CRAN.R-project.org/src/contrib/Archive/tweedie"}]
Text
Package source: tweedie_3.1.0.tar.gz Windows binaries: r-devel: tweedie_3.0.19.zip , r-release: tweedie_3.0.19.zip , r-oldrel: tweedie_3.0.19.zip macOS binaries: r-release (arm64): tweedie_3.0.19.tgz , r-oldrel (arm64): tweedie_3.0.19.tgz , r-release (x86_64): tweedie_3.0.19.tgz , r-oldrel (x86_64): tweedie_3.0.19.tgz Old sources: tweedie archive
Reverse dependencies
Heading
Reverse dependencies
Links
[{"label":"assessor","section":"","type":"","url":"https://cran.r-project.org/web/packages/assessor/index.html"},{"label":"ChainLadder","section":"","type":"","url":"https://cran.r-project.org/web/packages/ChainLadder/index.html"},{"label":"cplm","section":"","type":"","url":"https://cran.r-project.org/web/packages/cplm/index.html"},{"label":"ecoCopula","section":"","type":"","url":"https://cran.r-project.org/web/packages/ecoCopula/index.html"},{"label":"GlmSimulatoR","section":"","type":"","url":"https://cran.r-project.org/web/packages/GlmSimulatoR/index.html"},{"label":"gratia","section":"","type":"","url":"https://cran.r-project.org/web/packages/gratia/index.html"},{"label":"mvabund","section":"","type":"","url":"https://cran.r-project.org/web/packages/mvabund/index.html"},{"label":"SubTS","section":"","type":"","url":"https://cran.r-project.org/web/packages/SubTS/index.html"},{"label":"bayestestR","section":"","type":"","url":"https://cran.r-project.org/web/packages/bayestestR/index.html"},{"label":"clustTMB","section":"","type":"","url":"https://cran.r-project.org/web/packages/clustTMB/index.html"},{"label":"dsm","section":"","type":"","url":"https://cran.r-project.org/web/packages/dsm/index.html"},{"label":"fastglm","section":"","type":"","url":"https://cran.r-project.org/web/packages/fastglm/index.html"},{"label":"insight","section":"","type":"","url":"https://cran.r-project.org/web/packages/insight/index.html"},{"label":"ktweedie","section":"","type":"","url":"https://cran.r-project.org/web/packages/ktweedie/index.html"},{"label":"mcglm","section":"","type":"","url":"https://cran.r-project.org/web/packages/mcglm/index.html"},{"label":"mvgam","section":"","type":"","url":"https://cran.r-project.org/web/packages/mvgam/index.html"},{"label":"mvtweedie","section":"","type":"","url":"https://cran.r-project.org/web/packages/mvtweedie/index.html"},{"label":"nnTensor","section":"","type":"","url":"https://cran.r-project.org/web/packages/nnTensor/index.html"},{"label":"performance","section":"","type":"","url":"https://cran.r-project.org/web/packages/performance/index.html"},{"label":"raw","section":"","type":"","url":"https://cran.r-project.org/web/packages/raw/index.html"}]
Text
Reverse imports: assessor , ChainLadder , cplm , ecoCopula , GlmSimulatoR , gratia , mvabund , SubTS Reverse suggests: bayestestR , clustTMB , dsm , fastglm , insight , ktweedie , mcglm , mvgam , mvtweedie , nnTensor , performance , raw , sspm , statmod , tinyVAST
Linking
Heading
Linking
Links
[{"label":"https://CRAN.R-project.org/package=tweedie","section":"","type":"","url":"https://CRAN.R-project.org/package=tweedie"}]
Text
Please use the canonical form https://CRAN.R-project.org/package=tweedie to link to this page.
Materials 2
Documentation 5
Vignettes 3
Downloads 9
All page links 54

패키지 문서 원문

5 artifacts
citation
Citation
CRAN · 3.0.19 · Citation · text/html · 1,722 · 2026-05-07
Title
CRAN: tweedie citation info
Label
Citation
Text content
Text content
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}, }
field
NEWS
CRAN · 3.0.19 · Materials · text/html · 16,681 · 2026-05-07
Title
NEWS
Label
NEWS
Text content
Text content
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 tweed
field
README
CRAN · 3.0.19 · Materials · text/html · 7,983 · 2026-05-07
Title
README
Label
README
Text content
Text content
README 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.
reference_manual_html
Reference manual HTML
CRAN · 3.0.19 · Documentation · text/html · 52,470 · 2026-05-07
Title
Help for package tweedie
Label
Reference manual HTML
Text content
Text content
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 su
section
tweedie.pdf
CRAN · 3.0.19 · Documentation · application/pdf · 174,242 · 2026-05-07
Title
tweedie.pdf
Label
tweedie.pdf

Reference for tweedie (3.0.19)

15개 topic
Tweedie
Tweedie distributions
CRAN · 3.0.19 · tweedie/man/Tweedie.Rd · 2026-05-07

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).

Aliases
Tweediedtweedieptweedieqtweediertweedie
Keywords
distribution
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 var[Y]=^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 edms belong to the class of exponential dispersion models (edms), known for their role in generalized linear models (glms). 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. Special cases are the Poisson (p = 1 with = 1phi = 1), gamma (p = 2), and inverse Gaussian (p = 3) distributions. Evaluation is difficult for pp outside of p = 0, 1, 2, 3power = 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<21 < power < 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.
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)
See also
dtweedie_series, dtweedie_inversion, ptweedie_series, ptweedie_inversion, dtweedie_saddle, tweedie_lambda
Custom sections
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. 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. 10.1007/s11222-005-4070-y Jorgensen, B. (1997). Theory of Dispersion Models. Chapman and Hall, London.
dtweedie_inversion
Fourier Inversion Evaluation for the Tweedie Probability Function
CRAN · 3.0.19 · tweedie/man/dtweedie_inversion.Rd · 2026-05-07

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.

Aliases
dtweedie_inversiondtweedie.inversion
Keywords
distribution
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 ppower.
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).
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")
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. 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. 10.1007/s11222-007-9039-6
dtweedie_saddle
Tweedie densities evaluation using the saddlepoint approximation
CRAN · 3.0.19 · tweedie/man/dtweedie_saddle.Rd · 2026-05-07

Density function for the Tweedie EMDs using a saddlepoint approximation.

Aliases
dtweedie_saddledtweedie.saddle
Keywords
distribution
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 such that the variance is var[Y]=^var[Y] = phi * mu^xi. A synonym for power.
mu
vector of mean mu.
phi
vector of dispersion parameters phi.
eps
the offset in computing the variance function; the default is eps=1/6 (as suggested by Nelder and Pregibon, 1987).
power
scalar; a synonym for xi, the Tweedie index parameter.
Value
A numeric vector of densities.
Examples
# 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")
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. 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. 10.1007/s11222-005-4070-y Nelder, J. A. and Pregibon, D. (1987). An extended quasi-likelihood function Biometrika, 74(2), 221--232. 10.1093/biomet/74.2.221
dtweedie_series
Series Evaluation for the Tweedie Probability Function
CRAN · 3.0.19 · tweedie/man/dtweedie_series.Rd · 2026-05-07

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.

Aliases
dtweedie_seriesdtweedie.series
Keywords
distribution
Usage
dtweedie_series(y, power, mu,phi) dtweedie.series(y, power, mu, phi)
Arguments
y
vector of quantiles.
power
scalar; the value of ppower such that the variance is var[Y]=^pvar[Y] = phi * mu^power.
mu
vector of mean mu.
phi
vector of dispersion parameters phi.
Value
A numeric vector of densities.
Examples
# 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")
References
Dunn, Peter K and Smyth, Gordon K (2005). Series evaluation of Tweedie exponential dispersion model densities Statistics and Computing, 15(4). 267--280. 10.1007/s11222-005-4070-y
logLiktweedie
Log-likelihood for Tweedie distributions
CRAN · 3.0.19 · tweedie/man/logLiktweedie.Rd · 2026-05-07

Evaluates the log-likelihood for a fitted Tweedie glm.

Aliases
logLiktweedie
Usage
logLiktweedie(glm.obj, dispersion = NULL)
Arguments
glm.obj
a fitted glm object, fitted using the tweedie family.
dispersion
the dispersion parameter, usually extracted from glm.obj; however, occasionally a specified value of the dispersion may be needed.
Details
The log-Likelihood is computed by evaluating the density function.
Value
The value of the computed log-likelihood.
Examples
# 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)
See also
dtweedie
Note
Evaluating the likelihood can be time consuming, so the function may take some time for large data sets.
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. 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. 10.1007/s11222-005-4070-y Jorgensen, B. (1997). Theory of Dispersion Models. Chapman and Hall, London. Sakamoto, Y., Ishiguro, M., and Kitagawa G. (1986). Akaike Information Criterion Statistics. D. Reidel Publishing Company.
ptweedie_inversion
Fourier Inversion Evaluation for the Tweedie Distribution Function
CRAN · 3.0.19 · tweedie/man/ptweedie_inversion.Rd · 2026-05-07

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.

Aliases
ptweedie_inversionptweedie.inversion
Keywords
distribution
Usage
ptweedie_inversion(q, mu, phi, power, verbose = FALSE, details = FALSE, IGexact = TRUE) ptweedie.inversion(q, power, mu, phi, verbose, details)
Arguments
q
vector of quantiles.
mu
the mean parameter.
phi
the dispersion parameter.
power
the power parameter ppower.
verbose
logical; if TRUE, displays some internal computation details. The default is FALSE.
details
logical; if TRUE, returns the value of the distribution and some information about 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
If details = FALSE, a numeric vector of the distribution function values; if details = TRUE, a list containing CDF (a vector of the values of the distribution function), regions (a vector of the number of integration regions used), and exitstatus (a vector, where a 1 for any value means a computational problem or target relative accuracy not reached, for the corresponding observation). For special cases of p (i.e., p = 0, 1, 2, 3), where no inversion is needed, regions is set to NA for all values of q. For special cases of q for other values of p (i.e., P(Y = 0)), regions is set to NA.
Examples
# 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")
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.
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. 10.1007/s11222-007-9039-6
ptweedie_series
Series Evaluation for the Tweedie Distribution Function
CRAN · 3.0.19 · tweedie/man/ptweedie_series.Rd · 2026-05-07

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.

Aliases
ptweedie_seriesptweedie.series
Keywords
distribution
Usage
ptweedie_series(q, power, mu, phi, verbose = FALSE, details = FALSE) ptweedie.series(q, power, mu, phi, verbose = FALSE, details = FALSE)
Arguments
q
vector of quantiles.
power
the power parameter ppower.
mu
the mean parameter mu.
phi
the dispersion parameter phi.
verbose
logical; if TRUE, displays some internal computation details. The default is FALSE.
details
logical; if TRUE, returns the value of the distribution function and some details.
Value
A numeric vector of densities.
Examples
# 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")
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.
References
Dunn, Peter K and Smyth, Gordon K (2005). Series evaluation of Tweedie exponential dispersion model densities Statistics and Computing, 15(4). 267--280. 10.1007/s11222-005-4070-y
tweedie-package
Evaluation of Tweedie Exponential Family Models
CRAN · 3.0.19 · package · tweedie/man/tweedie-package.Rd · 2026-05-07

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.

Aliases
tweedie-packagetweedie
Keywords
distributionmodelsregression
Author
Maintainer: Peter K. Dunn pdunn2@usc.edu.au
tweedie_AIC
AIC for Tweedie Glms
CRAN · 3.0.19 · tweedie/man/tweedie_AIC.Rd · 2026-05-07

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.

Aliases
tweedie_AICAICtweedie
Usage
tweedie_AIC(glm.obj, dispersion = NULL, k = 2, verbose = TRUE) AICtweedie(glm.obj, dispersion = NULL, k = 2, verbose = TRUE)
Arguments
glm.obj
a fitted glm object, fitted using the tweedie family.
dispersion
the dispersion parameter, usually extracted from glm.obj; however, occasionally a specified value of the dispersion may be needed.
k
the aic penalty; k = 2 (the default) produces the AIC.
verbose
logical; if TRUE, display details of the internal process. The default is FALSE.
Details
The aic is computed by evaluating the density function.
Value
The value of the computed aic.
Examples
# 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)
See also
dtweedie
Note
Evaluating the likelihood can be time consuming, so the function may take some time for large data sets.
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. 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. 10.1007/s11222-005-4070-y Jorgensen, B. (1997). Theory of Dispersion Models. Chapman and Hall, London. Sakamoto, Y., Ishiguro, M., and Kitagawa G. (1986). Akaike Information Criterion Statistics. D. Reidel Publishing Company.
tweedie_convert
Tweedie Distribution: Convert Between Parameter Formats
CRAN · 3.0.19 · tweedie/man/tweedie_convert.Rd · 2026-05-07

Converts from the fitted glm parameters p, mu and phi and the corresponding underlying Poisson and gamma parameters (when 1 < p < 2).

Aliases
tweedie_converttweedie.convert
Usage
tweedie_convert(xi = NULL, mu, phi, power = NULL) tweedie.convert(xi = NULL, mu, phi, power = NULL)
Arguments
xi
a synonym for power.
mu
the mean parameter mu.
phi
the dispersion parameter phi.
power
the power parameter ppower; a synonym for xi.
Value
a list of the parameters of the parameters of the corresponding underlying Poisson and gamma densities: poisson.lambda (lambda from the underlying Poisson distribution), gamma.shape, gamma.scale (the shape and scale parameters from the underlying gamma distribution), p0 (the probability that Y = 0), gamma.mean and gamma.phi (the gamma mean and dispersion parameter values)
Examples
### 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)
tweedie_dev
Unit Deviance for a Tweedie Distribution
CRAN · 3.0.19 · tweedie/man/tweedie_dev.Rd · 2026-05-07

Computes the unit deviance for Tweedie distributions.

Aliases
tweedie_devtweedie.dev
Usage
tweedie_dev(y, mu, power) tweedie.dev(y, mu, power)
Arguments
y
vector of quantiles.
mu
the mean parameter mu.
power
the power parameter ppower.
Value
A numeric vector containing the unit deviance.
Examples
# Unit deviance is not symmetric in general: round( tweedie_dev(0:6, mu = 3, power = 1.1), 3)
References
Jorgensen, B. (1997). Theory of Dispersion Models. Chapman and Hall, London.
tweedie_integrand
Display Integrand Information for Tweedie Fourier inversion
CRAN · 3.0.19 · tweedie/man/tweedie_integrand.Rd · 2026-05-07

Plots the integrand for Fourier inversion and the real and imaginary parts separately.

Aliases
tweedie_integrand
Keywords
models
Usage
tweedie_integrand(y, power, mu, phi, t = seq(0, 5, length = 200), type = "PDF", whichPlots = 1:4, yLimits = NULL)
Arguments
y
vector of quantiles.
power
a synonym for xi; the Tweedie power-index on the variance.
mu
the mean parameter mu.
phi
the dispersion parameter phi.
t
the values of the variable over which to integrate; the default is t = seq(0, 5, length = 200).
type
either "PDF" (the default) for the (probability) density function, or "CDF" for the (cumulative) distribution function.
whichPlots
which combination of the four plots (described below) are produced; by default, all four are produced (i.e., whichPlots = 1:4).
yLimits
the yy-limits to use when plotting the integrand; the default is NULL which uses R defaults.
Details
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^power where ppower is greater than or equal to one, or less than or equal to zero. This function only evaluates for ppower greater than or equal to one. Special cases include the normal (p = 0power = 0), Poisson (p = 1power = 1 with = 1phi = 1), gamma (p = 2power = 2) and inverse Gaussian (p = 3power = 3) distributions. For other values of power, the distributions are still defined but cannot be written in closed form, and hence evaluation is very difficult. When 1 < p < 21 < power < 2, the distribution are continuous for YY greater than zero, with a positive mass at Y = 0Y = 0. For p > 2power > 2, the distributions are continuous for YY greater than zero. This function displays the integrand that is evaluated for computing the Fourier inversion, for the PDF or CDF.
Value
A list containing the real and imaginary parts of k(t)k(t), Real and Imag respectively, plus the values of the integrand as IG. The main purpose of the function is the side-effect of producing a 222x2 grid of plots. The first is the imaginary parts of k(t)k(t). The second is k(t)sinIm[k(t)]. The third is the real part of k(t)Re[k(t)] The fourth is the integrand, with the envelope shown as a dashed line.
Examples
tweedie_integrand(2, power = 3, mu = 1, phi = 1)
See also
dtweedie
Author
Peter Dunn (pdunn2@usc.edu.au)
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. 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. 10.1007/s11222-005-4070-y Dunn, Peter K and Smyth, Gordon K (2001). Tweedie family densities: methods of evaluation. Proceedings of the 16th International Workshop on Statistical Modelling, Odense, Denmark, 2--6 July Jorgensen, B. (1987). Exponential dispersion models. Journal of the Royal Statistical Society, B, 49, 127--162. Jorgensen, B. (1997). Theory of Dispersion Models. Chapman and Hall, London. Tweedie, M. C. K. (1984). An index which distinguishes between some important exponential families. Statistics: Applications and New Directions. Proceedings of the Indian Statistical Institute Golden Jubilee International Conference (Eds. J. K. Ghosh and J. Roy), pp. 579-604. Calcutta: Indian Statistical Institute.
tweedie_lambda
The Probability of Observing a Zero Value for a Tweedie Density
CRAN · 3.0.19 · tweedie/man/tweedie_lambda.Rd · 2026-05-07

The probability that the variable takes the value of zero.

Aliases
tweedie_lambda
Usage
tweedie_lambda(mu, phi, power)
Arguments
mu
the mean parameter mu.
phi
the dispersion parameter phi.
power
the power parameter p (sometimes denoted xi).
Value
The value of lambda when 1 < p < 2 such that P(Y=0) = (-)P(Y=0) = exp(-lambda). When p>2power > 2, a vector of zeros is returned.
Examples
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)
References
Dunn, Peter K and Smyth, Gordon K (2005). Series evaluation of Tweedie exponential dispersion model densities Statistics and Computing, 15(4). 267--280. 10.1007/s11222-005-4070-y
tweedie_plot
Plot Tweedie Models
CRAN · 3.0.19 · tweedie/man/tweedie_plot.Rd · 2026-05-07

This function produced a plot of the specified Tweedie distribution.

Aliases
tweedie_plottweedie.plot
Usage
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, ... )
Arguments
y
the values for yy in the plot.
xi
a synonym for power.
mu
the mean of the distribution mu.
phi
the dispersion parameter phi.
type
the type of plot, either pdf (the default) or cdf.
power
the variance power ppower.
add
logical; if TRUE, the plot is added to the current plot; if FALSE (the default) the plot is produced on a fresh plot.
...
plotting parameters passed to plot().
Details
If 1 < p < 21 < power < 2, the mass at Y=0Y = 0 is automatically added.
Examples
y <- seq(0, 4, length = 50) tweedie_plot(y, power = 1.1, mu = 1, phi = 1)
tweedie_profile
Profile Likelihood Estimate of Tweedie Variance Index Parameter
CRAN · 3.0.19 · tweedie/man/tweedie_profile.Rd · 2026-05-07

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).

Aliases
tweedie_profiletweedie.profile
Keywords
models
Usage
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 )
Arguments
formula
a formula expression as for other regression models and generalized linear models, of the form response ~ predictors.
p.vec
a vector of ppower values for consideration. The values must all be larger than one. If the response has zeros, values must be 1 < p < 2. If NULL (default), p.vec is set automatically.
xi.vec
a synonym for p.vec, as some authors use the xi notation.
link.power
the power link function to use in the tweedie glm family. These link functions g()g() are of the form g()=^link.powerg() = ^link.power, where link.power = 0 (default) refers to the logarithm link function.
data
an optional data frame, list or environment containing the variables.
weights
an optional vector of weights to be used in the fitting process.
offset
an a priori known component included in the linear predictor. See model.offset.
fit.glm
logical; if TRUE, the Tweedie glm is fitted using the value of p found by the profiling function. The default is FALSE.
do.smooth
logical; if TRUE (default), a spline is fitted to the data to smooth the profile likelihood plot. Note that p.vec must contain at least five points for smoothing.
do.plot
logical; if TRUE, a plot of the profile likelihood is produced. The default is FALSE.
do.ci
logical; if TRUE, the nominal 100*conf.level is computed. Defaults to the value of do.smooth. Confidence intervals are only computed if do.smooth = TRUE.
eps
the offset in computing the variance function. Default is 1/6 (as recommended by Nelder and Pregibon, 1987). eps is ignored unless method = "saddlepoint".
control
a list of parameters for controlling the fitting process;
do.points
logical; if TRUE, the points used to compute the likelihood as given by p.vec (or equivalently, xi.vec) are explicitly shown by points. The defaults is the value of do.plot.
method
the method of evaluation; one of saddlepoint, interpolation, series or inversion (the default).
conf.level
the level of confidence for the confidence intervals; the default is 0.95 (for 95%95% confidence intervals).
phi.method
the method used to estimate phi; one of saddlepoint, mle (the default).
verbose
logical; if TRUE, some details of the calculations are shown. The default is FALSE.
add0
logical; if TRUE, adds P(Y = 0)P(Y = 0) to the plot. The default is FALSE.
Details
For each value in p.vec, the function computes an estimate of phi and then computes the value of the log-likelihood for these parameters. The plot of the log-likelihood against p.vec allows the maximum likelihood value of pp to be found. Once pp is found, the distribution within the class of Tweedie distributions is identified.
Examples
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
Note
The estimates of pp and phi are printed invisibly. If the response variable has any exact zeros, the values in p.vec must all be between one and two. The function can be temperamental (for theoretical reasons involved in numerically computing the density; see Dunn and Smyth (2005)) and may be very slow or fail. One solution is to change the method. The default is method = "inversion"; then try "series", "interpolation", and "saddlepoint" in that order. Note that method = "saddlepoint" is an approximate method only. It is recommended that for the first use with a data set, use p.vec with only a small number of values and set do.smooth = FALSE, do.ci = FALSE. If this is successful, a larger vector p.vec and smoothing can be used.
References
Dunn, P. K. and Smyth, G. K. (2018). Generalized linear models with examples in R. Springer. 10.1007/978-1-4419-0118-7

버전 이력

RepositoryVersionPublishedFirst seenLast seenDocs
CRAN3.1.02026-05-292026-05-30
CRAN3.0.192026-05-192026-05-19

보안

표시할 OSV 데이터가 없습니다.

문헌 신호

표시할 OpenAlex 데이터가 없습니다.