Tweedie(mgcv)
Tweedie()所属R语言包:mgcv
GAM Tweedie family
GAM特威迪家庭
译者:生物统计家园网 机器人LoveR
描述----------Description----------
A Tweedie family, designed for use with gam from the mgcv library. Restricted to variance function powers between 1 and 2. A useful alternative to quasi when a full likelihood is desirable.
一个的特威迪家庭,设计gammgcv库使用的。方差函数1和2之间的权力限制。一个有用的替代quasi“当一个完整的可能性是可取的。
用法----------Usage----------
Tweedie(p=1, link = power(0))
参数----------Arguments----------
参数:p
the variance of an observation is proportional to its mean to the power p. p must be greater than 1 and less than or equal to 2. 1 would be Poisson, 2 is gamma.
它的平均电源p观察方差成正比。 p必须大于1和小于或等于2。 1人是泊松,二是伽马。
参数:link
The link function: one of "log", "identity", "inverse", "sqrt", or a power link.
链接功能:一"log","identity","inverse","sqrt"或power链接。
Details
详情----------Details----------
A Tweedie random variable with 1<p<2 is a sum of N gamma random variables where N has a Poisson distribution. The p=1 case is a generalization of a Poisson distribution and is a discrete distribution supported on integer multiples of the scale parameter. For 1<p<2 the distribution is supported on the positive reals with a point mass at zero. p=2 is a gamma distribution. As p gets very close to 1 the continuous distribution begins to converge on the discretely supported limit at p=1, and is therefore highly multimodal. See ldTweedie for more on this behaviour.
一个特威迪随机变量1 <p <2时是N伽玛随机变量的总和,其中N泊松分布。 p = 1的情况下是一个概括和泊松分布是离散分布的尺度参数的整数倍的支持。 1 <P <2分布在零点质量的积极雷亚尔支持。 P = 2是一个伽玛分布。为P变得非常接近1开始连续分布收敛谨慎支持的限制,在P = 1,因此是高度多式联运。看到ldTweedie这种行为。
Tweedie is based partly on the poisson family, and partly on tweedie from the statmod package. It includes extra components to work with all mgcv GAM fitting methods as well as an aic function. The required log density evaluation (+ derivatives w.r.t. scale) is based on the series evaluation method of Dunn and Smyth (2005).
Tweedie部分基于poisson家庭,并在一定程度上tweediestatmod包。它包含了额外的元件,能够与所有的mgcv自由亚齐运动拟合方法以及aic功能。所需的记录密度评价(+衍生工具的相对规模),邓恩和史密斯(2005)的一系列评价方法的基础上。
Without the restriction on p the calculation of Tweedie densities is less straightforward, and there does not currently seem to be an implementation which offers any benefit over quasi. If you really need to this case then the tweedie package is the place to start.
没有限制p的特威迪密度的计算方法是那么简单,不存在目前似乎是一个实施提供任何效益超过quasi。如果你真的需要这种情况然后tweedie包开始的地方,。
值----------Value----------
An object inheriting from class family, with additional elements
对象继承类family,与其他元素
参数:dvar
the function giving the first derivative of the variance function w.r.t. mu.
一阶导数方差函数WRT功能mu。
参数:d2var
the function giving the second derivative of the variance function w.r.t. mu.
二阶导数方差函数WRT功能mu。
参数:ls
A function returning a 3 element array: the saturated log likelihood followed by its first 2 derivatives w.r.t. the scale parameter.
一个函数返回一个3元素的数组:饱和日志的可能性,其次是其第2衍生物WRT尺度参数。
作者(S)----------Author(s)----------
Simon N. Wood <a href="mailto:simon.wood@r-project.org">simon.wood@r-project.org</a>
modified from Venables and Ripley's <code>negative.binomial</code> family.
参考文献----------References----------
Statistics and Computing 15:267-280
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.
参见----------See Also----------
ldTweedie
ldTweedie
举例----------Examples----------
library(mgcv)
set.seed(3)
n<-400
## Simulate data (really Poisson with log-link)[#模拟数据(泊松真的与日志链接)]
dat <- gamSim(1,n=n,dist="poisson",scale=.2)
## Fit a `nearby' Tweedie...[#适合附近的“特威迪...]
b <- gam(y~s(x0)+s(x1)+s(x2)+s(x3),family=Tweedie(1.1,power(.1)),
data=dat)
plot(b,pages=1)
print(b)
## Same by approximate REML...[#相同近似REML法...]
b1 <- gam(y~s(x0)+s(x1)+s(x2)+s(x3),family=Tweedie(1.1,power(.1)),
data=dat,method="REML")
plot(b1,pages=1)
print(b1)
rm(dat)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|