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

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

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

                                         Loglinear Model for Two Binary Responses
                                         二元响应的对数线性模型。

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

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

Fits a loglinear model to two binary responses.
适合一个对数线性模型两个二进制反应。


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


loglinb2(exchangeable = FALSE, zero = NULL)




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

参数:exchangeable
Logical. If TRUE, the two marginal probabilities are constrained to be equal. Should be set TRUE for ears, eyes, etc. data.  
逻辑。如果TRUE,这两个边缘概率的约束是平等的。应设置TRUE耳朵,眼睛等数据。


参数:zero
Which linear/additive predictor is modelled as an intercept only? A NULL means none of them.  
其中线性/添加剂的预测中仅作为一个拦截模拟? ANULL是指他们没有。


Details

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

The model is
该模型是

where y1 and y2 are 0 or 1, and  the parameters are u1, u2, u12. The normalizing parameter u0 can be expressed as a function of the other parameters, viz.,
y1和y2是0或1,参数是u1,u2,u12。可以表示为其它参数的函数的归一化参数u0,即,

The linear/additive predictors are  (eta1,eta2,eta3) =        (u1,u2,u12).
线性/对的添加剂的预测是(eta1,eta2,eta3) =        (u1,u2,u12)。


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

When fitted, the fitted.values slot of the object contains the four joint probabilities, labelled as (Y1,Y2) = (0,0), (0,1), (1,0), (1,1), respectively.
嵌合时,fitted.values插槽的对象中包含的四个联合概率,标记为(Y1,Y2)=(0,0),(0,1),(1,0),(1,1)分别。


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

The response must be a two-column matrix of ones and zeros only. This is more restrictive than binom2.or, which can handle more types of input formats. Note that each of the 4 combinations of the multivariate response need to appear in the data set.
响应必须是一个两列的矩阵的0和1只。这是更严格的比的binom2.or,它可以处理更多类型的输入格式。请注意,数据集合中的每一个的4个组合的多变量响应需要出现。


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


Thomas W. Yee



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

Discussion to: “Smoothing spline ANOVA for multivariate Bernoulli observations, with application to ophthalmology data (with discussion)” by Gao, F., Wahba, G., Klein, R., Klein, B. Journal of the American Statistical Association, 96, 127–160.
Generalized Linear Models, 2nd ed. London: Chapman & Hall.

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

binom2.or, binom2.rho, loglinb3.
binom2.or,binom2.rho,loglinb3。


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


coalminers = transform(coalminers, Age = (age - 42) / 5)

# Get the n x 4 matrix of counts [获取的n×4矩阵的计数]
temp = vglm(cbind(nBnW,nBW,BnW,BW) ~ Age, binom2.or, coalminers)
counts = round(c(weights(temp, type = "prior")) * temp@y)

# Create a n x 2 matrix response for loglinb2()[创建一个n×2矩阵响应的loglinb2()]
# bwmat = matrix(c(0,0, 0,1, 1,0, 1,1), 4, 2, byrow=TRUE)[bwmat =矩阵(三(0,0,0,1,1,0,1,1),4,2,byrow = TRUE)]
bwmat = cbind(bln=c(0,0,1,1), wheeze=c(0,1,0,1))
matof1 = matrix(1, nrow(counts), 1)
newminers = data.frame(bln = kronecker(matof1, bwmat[,1]),
                       wheeze = kronecker(matof1, bwmat[,2]),
                       wt = c(t(counts)),
                       Age = with(coalminers, rep(age, rep(4, length(age)))))
newminers = newminers[with(newminers, wt) > 0,]

fit = vglm(cbind(bln,wheeze) ~ Age, loglinb2, weight = wt, data = newminers)
coef(fit, matrix = TRUE)    # Same! (at least for the log odds-ratio) [一样的! (至少对log的赔率比)]
summary(fit)

# Try reconcile this with McCullagh and Nelder (1989), p.234 [尝试调和McCullagh和Nelder(1989年),第234页]
(0.166-0.131) / 0.027458   # 1.275 is approximately 1.25 [1.275约为1.25]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-26 15:31 , Processed in 0.019457 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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