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

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

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

                                         LMS Quantile/Expectile Regression with a Box-Cox Transformation to Normality
                                         LMS的分量/ Expectile回归正常的一个Box-Cox变换

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

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

LMS quantile/expectile regression with the Box-Cox transformation to normality.
LMS的位数/ expectile的回归正常的Box-Cox转换。


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


lms.bcn(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, expectiles = FALSE)



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

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


参数:zero
An integer-valued vector specifying which linear/additive predictors are modelled as intercepts only. The values must be from the set {1,2,3}. The default value usually increases the chance of successful convergence. Setting zero = NULL means they all are functions of the covariates. For more information see CommonVGAMffArguments.  
指定一个整数值向量线性/添加剂的预测模型仅作为拦截。这些值必须是从集合{1,2,3}。默认值通常会增加成功融合的机会。设置zero = NULL是指他们都是协变量的函数。有关详细信息,请参阅CommonVGAMffArguments。


参数:llambda, lmu, lsigma
Parameter link functions applied to the first, second and third linear/additive predictors. See Links for more choices, and CommonVGAMffArguments.  
参数链接功能,适用于第一,第二和第三次的线性/添加剂预测因子。见Links更多的选择,和CommonVGAMffArguments。


参数:elambda, emu, esigma
List. Extra argument for each of the links. See earg in Links for general information, as well as CommonVGAMffArguments.  
列表。每个环节的额外参数。见eargLinks的一般信息,以及CommonVGAMffArguments。


参数:dfmu.init
Degrees of freedom for the cubic smoothing spline fit applied to get an initial estimate of mu. See vsmooth.spline.  
自由的三次样条拟合度得到的初步估计亩。见vsmooth.spline。


参数:dfsigma.init
Degrees of freedom for the cubic smoothing spline fit applied to get an initial estimate of sigma. See vsmooth.spline. This argument may be assigned NULL to get an initial value using some other algorithm.  
自由的三次样条拟合度得到一个初始估计值的标准差。见vsmooth.spline。这种说法可能被分配NULL使用一些其他的算法得到一个初始值。


参数:ilambda
Initial value for lambda. If necessary, it is recycled to be a vector of length n where n is the number of (independent) observations.  
拉姆达的初始值。如果有必要,它被回收,是一个矢量的长度n其中n是多少(独立的)的意见。


参数:isigma
Optional initial value for sigma. If necessary, it is recycled to be a vector of length n. The default value, NULL, means an initial value is computed in the @initialize slot of the family function.  
可选的初始值的标准差。如果有必要,它被回收,是一个向量的长度n。默认值,NULL,意味着在@initialize插槽家庭函数的初始值的计算。


参数:expectiles
A single logical. If TRUE then the method is LMS-expectile regression; expectiles are returned rather than quantiles. The default is LMS quantile regression based on the normal distribution.  
一个单一的逻辑。如果TRUE的方法是LMS-expectile回归; expectiles位数,而不是返回。默认值是LMS基于分位数回归的正常分布。


Details

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

Given a value of the covariate, this function applies a Box-Cox transformation to the response to best obtain normality. The parameters chosen to do this are estimated by maximum likelihood or penalized maximum likelihood.
此功能适用于一个给定的协变量的值,Box-Cox转换的响应,以最好地获得正常。选择这样做的最大似然估计的参数或惩罚最大似然法。

In more detail, the basic idea behind this method is that, for a fixed value of x, a Box-Cox transformation of the response Y is applied to obtain standard normality. The 3 parameters (lambda, mu, sigma, which start with the letters “L-M-S” respectively, hence its name) are chosen to maximize a penalized log-likelihood (with vgam). Then the appropriate quantiles of the standard normal distribution are back-transformed onto the original scale to get the desired quantiles. The three parameters may vary as a smooth function of x.
更详细地说,这种方法背后的基本理念是,为一个固定值x,一个Box-Cox转换的响应Y应用获得标准的常态。 3个参数(lambda,mu,sigma,其中分别以字母“LM-S”开头,因此它的名字)的选择,以最大限度地提高被处罚的对数似然(与vgam“)。然后适当的标准正态分布的分位数,后面转化到原来的规模,以获得所需的位数。这三个参数可能会发生变化作为平滑函数x。

The Box-Cox power transformation here of the Y, given x, is
的Box-Cox电源转换在这里的Y,给x,

for lambda(x) != 0. (The singularity at lambda(x) = 0 is handled by a simple function involving a logarithm.) Then Z is assumed to have a standard normal distribution. The parameter sigma(x) must be positive, therefore VGAM chooses eta(x)^T = (lambda(x), mu(x), log(sigma(x))) by default. The parameter mu is also positive, but while log(mu) is available, it is not the default because mu is more directly interpretable. Given the estimated linear/additive predictors, the 100*alpha percentile can be estimated by inverting the Box-Cox power transformation at the 100*alpha percentile of the standard normal distribution.
lambda(x) != 0。 (奇点lambda(x) = 0是由一个简单的函数对数)。Z假定有一个标准的正态分布。参数sigma(x)必须是积极的,因此VGAM选择eta(x)^T = (lambda(x), mu(x), log(sigma(x)))默认情况下。参数mu也是积极的,但而log(mu)是,它是默认的,因为mu是更直接的解释。估计线性/添加剂的预测,100*alpha百分可估计颠倒的Box-Cox100*alpha的标准正态分布的百分电源转换。

Of the three functions, it is often a good idea to allow mu(x) to be more flexible because the functions lambda(x) and sigma(x) usually vary more smoothly with x. This is somewhat reflected in the default value for the argument zero, viz. zero = c(1,3).
三大功能,它通常是一个好主意,让mu(x)可以更灵活,因为功能lambda(x)和sigma(x)通常变化更平稳,x。这是在默认的参数值zero,即有所反映。 zero = c(1,3)。


值----------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 ----------

The computations are not simple, therefore convergence may fail. In that case, try different starting values. Also, the estimate may diverge quickly near the solution, in which case try prematurely stopping the iterations by assigning maxits to be the iteration number corresponding to the highest likelihood value.
不是简单的计算,因此可能无法收敛。在这种情况下,尝试不同的初始值。此外,估计可能会偏离迅速附近的溶液,在这种情况下,尝试过早停止通过分配maxits对应于最高似然值的迭代次数的迭代。

One trick is to fit a simple model and use it to provide initial values for a more complex model; see in the examples below.
一个窍门是,以适应一个简单的模型,并用它来提供更复杂的模型的初始值,看下面的例子中。


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

The response must be positive because the Box-Cox transformation cannot handle negative values. The LMS-Yeo-Johnson-normal method can handle both positive and negative values.
Box-Cox转换必须是积极的,因为不能处理负值的反应。 LMS杨 - 约翰逊正常的方法可以处理的正面和负面的价值观。

LMS-BCN expectile regression is a new methodology proposed by myself!
LMS-的BCN expectile回归的是我自己提出的一种新的方法!

In general, the lambda and sigma functions should be more smoother than the mean function. Having zero = 1, zero = 3 or zero = c(1,3) is often a good idea. See the example below.
在一般情况下,在lambda和sigma函数应该是更顺畅比的平均值的函数。有zero = 1,zero = 3或zero = c(1,3)往往是一个好主意。请看下面的例子。

While it is usual to regress the response against a single covariate, it is possible to add other explanatory variables, e.g., gender. See http://www.stat.auckland.ac.nz/~yee for further information and examples about this feature.
虽然它是通常倒退的响应对一个单一的协变量,它是可以添加其他的解释变量,例如,性别。 http://www.stat.auckland.ac.nz/仪有关此功能的更多信息和例子。


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


Thomas W. Yee



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

Smoothing Reference Centile Curves: The LMS Method and Penalized Likelihood. Statistics in Medicine,  11, 1305–1319.
Nonparametric Regression and Generalized Linear Models: A Roughness Penalty Approach, London: Chapman & Hall.
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.bcg, lms.yjn, qtplot.lmscreg, deplot.lmscreg, cdf.lmscreg,  alaplace1, amlnormal, denorm, CommonVGAMffArguments.
lms.bcg,lms.yjn,qtplot.lmscreg,deplot.lmscreg,cdf.lmscreg,alaplace1,amlnormal,denorm,CommonVGAMffArguments。


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


mysubset = subset(xs.nz, sex == "M" & ethnic == "1" & Study1)
mysubset = transform(mysubset, BMI = weight / height^2)
BMIdata = mysubset[, c("age", "BMI")]
BMIdata = na.omit(BMIdata)
BMIdata = subset(BMIdata, BMI < 80 & age < 65) # Delete an outlier[删除离群值]
summary(BMIdata)

fit = vgam(BMI ~ s(age, df = c(4, 2)), lms.bcn(zero = 1), BMIdata, trace = TRUE)

head(predict(fit))
head(fitted(fit))
head(BMIdata)
head(cdf(fit)) # Person 56 is probably overweight, given his age[可能是超重的人56,考虑到他的年龄]
colMeans(c(depvar(fit)) < fitted(fit)) # Sample proportions below the quantiles[样本比例低于位数]

# Convergence problems? Try this trick: fit0 is a simpler model used for fit1[收敛的问题呢?试试这招:fit0是一个简单的模型,用于FIT1]
fit0 = vgam(BMI ~ s(age, df = 4), lms.bcn(zero = c(1,3)), BMIdata, trace = TRUE)
fit1 = vgam(BMI ~ s(age, df = c(4, 2)), lms.bcn(zero = 1), BMIdata,
            etastart = predict(fit0), trace = TRUE)

## Not run: [#不运行:]
# Quantile plot[分量图]
par(bty = "l", mar = c(5, 4, 4, 3) + 0.1, xpd = TRUE)
qtplot(fit, percentiles = c(5, 50, 90, 99), main = "Quantiles",
       xlim = c(15, 66), 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(fit, x0 = 20, y = ygrid, xlab = "BMI", col = "black",
  main = "Density functions at Age = 20 (black), 42 (red) and 55 (blue)"))
aa = deplot(fit, x0 = 42, y = ygrid, add = TRUE, llty = 2, col = "red")
aa = deplot(fit, 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:31 , Processed in 0.023818 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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