找回密码
 注册
查看: 645|回复: 0

R语言 VGAM包 lms.bcg()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-10-1 15:41:20 | 显示全部楼层 |阅读模式
lms.bcg(VGAM)
lms.bcg()所属R语言包:VGAM

                                         LMS Quantile Regression with a Box-Cox transformation to a Gamma Distribution
                                         LMS与Box-Cox转换到伽玛分布的分位数回归

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

LMS quantile regression with the Box-Cox transformation to the gamma distribution.
LMS的Box-Cox转换的伽玛分布的分位数回归。


用法----------Usage----------


lms.bcg(percentiles = c(25, 50, 75), zero = c(1, 3),
        llambda = "identity", lmu = "identity", lsigma = "loge",
        elambda = list(), emu = list(), esigma = list(),
        dfmu.init = 4, dfsigma.init = 2, ilambda = 1, isigma = NULL)



参数----------Arguments----------

参数:percentiles
A numerical vector containing values between 0 and 100, which are the quantiles. They will be returned as "fitted values".  
一个数值向量的值介于0和100之间,这是分位数。他们将返回“拟合值”。


参数:zero
See lms.bcn.  
见lms.bcn。


参数:llambda, lmu, lsigma
See lms.bcn.  
见lms.bcn。


参数:elambda, emu, esigma
See lms.bcn.  
见lms.bcn。


参数:dfmu.init, dfsigma.init
See lms.bcn.  
见lms.bcn。


参数:ilambda, isigma
See lms.bcn.  
见lms.bcn。


Details

详细信息----------Details----------

Given a value of the covariate, this function applies a Box-Cox transformation to the response to best obtain a gamma distribution.  The parameters chosen to do this are estimated by maximum likelihood or penalized maximum likelihood. Similar details can be found at lms.bcn.
此功能适用于一个给定的协变量的值,Box-Cox转换最好的获得伽玛分布的回应。选择这样做的最大似然估计的参数或惩罚最大似然法。类似的细节,可以发现在lms.bcn。


值----------Value----------

An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm, rrvglm and vgam.
类的一个对象"vglmff"(见vglmff-class)。该对象被用于建模功能,如vglm,rrvglm和vgam。


警告----------Warning ----------

This VGAM family function comes with the same warnings as lms.bcn. Also, the expected value of the second derivative with respect to lambda may be incorrect (my calculations do not agree with the Lopatatzidis and Green manuscript.)
这VGAM家庭功能是作为lms.bcn同样的警告。此外,预期的lambda值的二阶导数可能是不正确的(我的计算不同意的Lopatatzidis和绿色稿件。)


注意----------Note----------

Similar notes can be found at lms.bcn.
类似的说明可以发现,在lms.bcn。


(作者)----------Author(s)----------


Thomas W. Yee



参考文献----------References----------

Semiparametric quantile regression using the gamma distribution.
Quantile regression via vector generalized additive models. Statistics in Medicine, 23, 2295–2315.
http://www.stat.auckland.ac.nz/~yee contains further information and examples.

参见----------See Also----------

lms.bcn, lms.yjn, qtplot.lmscreg, deplot.lmscreg, cdf.lmscreg, bmi.nz, amlexponential.
lms.bcn,lms.yjn,qtplot.lmscreg,deplot.lmscreg,cdf.lmscreg,bmi.nz,amlexponential。


实例----------Examples----------


# This converges, but deplot(fit) and qtplot(fit) do not work[这收敛,但deplot的(FIT)和qtplot(FIT)不工作]
fit0 = vglm(BMI ~ bs(age, df = 4), lms.bcg, bmi.nz, trace = TRUE)
coef(fit0, matrix = TRUE)
## Not run: [#不运行:]
par(mfrow = c(1, 1))
plotvgam(fit0, se = TRUE) # Plot mu function (only)[图亩功能(只)]

## End(Not run)[#(不执行)]

# Use a trick: fit0 is used for initial values for fit1.[使用一招:,fit0用于初始值FIT1。]
fit1 = vgam(BMI ~ s(age, df = c(4, 2)), etastart = predict(fit0),
            lms.bcg(zero = 1), bmi.nz, trace = TRUE)

# Difficult to get a model that converges.[很难得到一个模型,该模型收敛。]
# Here, we prematurely stop iterations because it fails near the solution.[在这里,我们附近的解决方案,因为它没有过早停止迭代。]
fit2 = vgam(BMI ~ s(age, df = c(4, 2)), maxit = 4,
            lms.bcg(zero = 1, ilam = 3), bmi.nz, trace = TRUE)
summary(fit1)
head(predict(fit1))
head(fitted(fit1))
head(bmi.nz)
# Person 1 is near the lower quartile of BMI amongst people his age[1人是附近的下四分位数之间的BMI人年龄]
head(cdf(fit1))

## Not run: [#不运行:]
# Quantile plot[分量图]
par(bty = "l", mar=c(5, 4, 4, 3) + 0.1, xpd = TRUE)
qtplot(fit1, percentiles=c(5, 50, 90, 99), main = "Quantiles",
       xlim = c(15, 90), las = 1, ylab = "BMI", lwd = 2, lcol = 4)

# Density plot[密度图]
ygrid = seq(15, 43, len = 100)  # BMI ranges[BMI范围]
par(mfrow = c(1, 1), lwd = 2)
(aa = deplot(fit1, x0 = 20, y = ygrid, xlab = "BMI", col = "black",
  main = "Density functions at Age = 20 (black), 42 (red) and 55 (blue)"))
aa = deplot(fit1, x0=42, y=ygrid, add=TRUE, llty=2, col="red")
aa = deplot(fit1, x0=55, y=ygrid, add=TRUE, llty=4, col="blue", Attach=TRUE)
aa@post$deplot  # Contains density function values[包含密度函数值]

## End(Not run)[#(不执行)]

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-26 18:41 , Processed in 0.023055 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表