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

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

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

                                         Mixture of Two Exponential Distributions
                                         两个指数分布的混合物

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

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

Estimates the three parameters of a mixture of two exponential distributions by maximum likelihood estimation.
两个指数分布的混合物三个参数的估计最大似然估计。


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


mix2exp(lphi = "logit", llambda = "loge", ephi = list(),
        el1 = list(), el2 = list(), iphi = 0.5, il1 = NULL, il2 = NULL,
        qmu = c(0.8, 0.2), nsimEIM = 100, zero = 1)



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

参数:lphi, llambda
Link functions for the parameters phi and lambda. The latter is the rate parameter and note that the mean of an ordinary exponential distribution is 1 / λ. See Links for more choices.  
链接功能的参数phi和lambda。后者是一个普通的指数分布,平均1 / λ速率参数和注意。见Links更多的选择。


参数:ephi, el1, el2
List. Extra argument for each of the links. See earg in Links for general information.  
列表。每个环节的额外参数。见earg中Links的一般信息。


参数:iphi, il1, il2
Initial value for phi, and optional initial value for lambda1 and lambda2. The last two have values that must be positive. The default is to compute initial values internally using the argument qmu.  
phi的初始值和可选初始值lambda1和lambda2。最后两个值必须是积极的。默认值是计算的初始值内部使用参数qmu的。


参数:qmu
Vector with two values giving the probabilities relating to the sample quantiles for obtaining initial values for lambda1 and lambda2. The two values are fed in as the probs argument into quantile.  
向量的两个值,给出了有关的样本位数的概率获得的初始值lambda1和lambda2。这两个值被送入作为probs到quantile参数。


参数:nsimEIM, zero
See CommonVGAMffArguments.  
见CommonVGAMffArguments。


Details

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

The probability function can be loosely written as
的概率函数可以松散地写为

where phi is the probability an observation belongs to the first group, and y>0. The parameter phi satisfies 0 < phi < 1. The mean of Y is phi/lambda1 + (1-phi)/lambda2 and this is returned as the fitted values. By default, the three linear/additive predictors are (logit(phi),   log(lambda1), log(lambda2))^T.
其中phi是观察属于第一组的概率,和y>0。参数phi满足0 < phi < 1。平均Y是phi/lambda1 + (1-phi)/lambda2,这是返回的拟合值。默认情况下,三个线性/添加剂的预测是(logit(phi),   log(lambda1), log(lambda2))^T。


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

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


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

This VGAM family function requires care for a successful application. In particular, good initial values are required because of the presence of local solutions. Therefore running this function with several different combinations of arguments such as iphi, il1, il2, qmu is highly recommended. Graphical methods such as hist can be used as an aid.
这VGAM家庭功能需要照顾了成功的应用。特别是,良好的初始值是必需的,这是因为存在本地的解决方案。因此,运行此功能与几种不同的组合参数,如iphi,il1,il2,qmu,强烈推荐。 hist图形的方法,如可以用来作为一种辅助手段。


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

Fitting this model successfully to data can be difficult due to local solutions, uniqueness problems and ill-conditioned data. It pays to fit the model several times with different initial values and check that the best fit looks reasonable. Plotting the results is recommended. This function works better as lambda1 and lambda2 become more different. The default control argument trace = TRUE is to encourage monitoring convergence.
这个模型成功的拟合数据可以是困难的,因为当地的解决方案,唯一性问题和病态的数据。它支付的模式,以适应不同的初始值和多次检查最合适看起来合理。建议绘制的结果。此功能更好地为lambda1和lambda2变得更加不同。默认的控制参数trace = TRUE是鼓励开展监督收敛。


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


T. W. Yee



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

rexp, exponential, mix2poisson.
rexp,exponential,mix2poisson。


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


lambda1 = exp(1); lambda2 = exp(3)
(phi = logit(-1, inverse = TRUE))
mdata = data.frame(y1 = rexp(nn <- 1000, lambda1))
mdata = transform(mdata, y2 = rexp(nn, lambda2))
mdata = transform(mdata, Y  = ifelse(runif(nn) < phi, y1, y2))
fit = vglm(Y ~ 1, mix2exp, mdata, trace = TRUE)
coef(fit, matrix = TRUE)

# Compare the results with the truth[比较的结果与事实真相]
round(rbind('Estimated' = Coef(fit),
            'Truth' = c(phi, lambda1, lambda2)), dig = 2)

## Not run: # Plot the results[#不运行:#图的结果]
with(mdata, hist(Y, prob = TRUE, main = "Orange = estimate, blue = truth"))
abline(v = 1 / Coef(fit)[c(2, 3)],  lty = 2, col = "orange", lwd = 2)
abline(v = 1 / c(lambda1, lambda2), lty = 2, col = "blue", lwd = 2)
## End(Not run)[#(不执行)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-26 14:55 , Processed in 0.040426 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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