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

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

[复制链接]
发表于 2012-9-30 02:40:10 | 显示全部楼层 |阅读模式
misclass(simex)
misclass()所属R语言包:simex

                                        Generates misclassified data
                                         产生错误分类的数据

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

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

Takes a data.frame and produces misclassified data. Probabilities for the missclassification are given in the mc.matrix.
需要一个data.frame和产生错误分类的数据。概率给出为missclassification的在mc.matrix。


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


misclass(data.org, mc.matrix, k)



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

参数:data.org
data.frame containing the factor variables. Must be factors
data.frame含有该因子变量。必须是factor的


参数:mc.matrix
a list of matrices giving the probabilities for the misclassification. Names of the list must correspond to the variable names in data.org. The colnames must be named according to the factor levels
list给误判的概率矩阵。名称list必须对应的变量名data.org。必须命名为colnames根据因子水平


参数:k
the exponent for the misclassification matrix
误判矩阵的指数


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

A data.frame containing the misclassified variables
Adata.frame包含错误分类变量


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


Wolfgang Lederer, <a href="mailto:wolfgang.lederer@googlemail.com">wolfgang.lederer@googlemail.com</a>



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

mcsimex, build.mc.matrix,
mcsimex,build.mc.matrix,


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


x1 <- factor(rbinom(100, 1, 0.5))
x2 <- factor(rbinom(100, 2, 0.5))

p1 <- matrix(c(1, 0, 0, 1), nrow = 2)
p2 <- matrix(c(0.8, 0.1, 0.1, 0.1, 0.8, 0.1, 0.1, 0.1, 0.8), nrow = 3)

colnames(p1) <- levels(x1)
colnames(p2) <- levels(x2)

x <- data.frame(x1 = x1, x2 = x2)
mc.matrix <- list(x1 = p1, x2 = p2)

x.mc <- misclass(data.org = x, mc.matrix = mc.matrix, k = 1)

identical(x[, 1], x.mc[, 1]) # TRUE[TRUE]
identical(x[, 2], x.mc[, 2]) # FALSE[FALSE]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-24 07:18 , Processed in 0.026989 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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