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

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

[复制链接]
发表于 2012-2-25 16:47:30 | 显示全部楼层 |阅读模式
tls(DTA)
tls()所属R语言包:DTA

                                        Weighted Total Least Square Regression
                                         加权总体最小二乘回归

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

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

Weigthed total least square regression according to Golub and Van Loan (1980) in SIAM J.Numer.Anal Vol 17 No.6
根据戈卢布和Van贷款(1980年)在暹罗J.Numer.Anal第6卷17轻量化总体最小二乘回归


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


tls(formula, D = NULL, T = NULL, precision = .Machine$double.eps)



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

参数:formula
An object of class formula.
公式类的对象。


参数:D
Diagonal weigth matrix. Default weights are set to 1.
自重对角线矩阵。默认权重设置为1。


参数:T
Diagonal weigth matrix. Default weights are set to 1.
自重对角线矩阵。默认权重设置为1。


参数:precision
Smallest possible numeric value on this machine (default).
最小的可能数值(默认)这台机器上。


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

tls returns a lm object.
tls返回一个LM对象。


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


Sebastian Duemcke <a href="mailto:duemcke@lmb.uni-muenchen.de">duemcke@lmb.uni-muenchen.de</a>



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



举例----------Examples----------


f = 1.5 # true ratio[真正的比]
a = rnorm(5000)
b = f*a
a = a + rnorm(5000,sd=0.5)
b = b + rnorm(5000,sd=0.5)

coeff.tls = coef(tls(b ~ a + 0))
coeff.lm1 = coef(lm(b ~ a + 0))
coeff.lm2 = 1/coef(lm(a ~ b + 0))

heatscatter(a,b)
abline(0,coeff.lm1,col="red",pch=19,lwd=2)
abline(0,coeff.lm2,col="orange",pch=19,lwd=2)
abline(0,coeff.tls,col="green",pch=19,lwd=2)
abline(0,f,col="grey",pch=19,lwd=2,lty=2)
legend("topleft", c("Least-squares regr. (y ~ x + 0)", "Least-squares regr. (x ~ y + 0)", "Total Least-squares regr.", "True ratio"), col=c("red", "orange", "green", "grey"), lty=c(1,1,1,2), lwd=2)

results = c(coeff.tls,coeff.lm1,coeff.lm2)
names(results) = c("coeff.tls","coeff.lm1","coeff.lm2")
print(results)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-11 21:28 , Processed in 0.023326 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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