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

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

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

                                        Prediction Analysis of Categorical Data
                                         分类数据的预测分析

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

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

Performs a Prediction Analysis of Categorical Data.
分类数据进行预测分析。


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


pamCat(data, cl, theta = NULL, n.theta = 10, newdata = NULL, newcl = NULL)



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

参数:data
a numeric matrix composed of the integers between 1 and n.cat, where n.cat is the number of levels each of the variables represented by the rows of data must take. No missing values allowed.
组成的一个数字矩阵之间的整数1和n.cat,其中n.cat是水平data必须采取的行所表示的每一个的变量的数目。不丢失的允许值。


参数:cl
a numeric vector of length ncol(data) comprising the class labels of the observations represented by the columns of data. cl must consist of the integers between 1 and n.cl, where n.cl is the number of classes.
一个数值向量的长度ncol(data)包括类标签的列data代表的意见。 cl必须由之间的整数n.cl,其中n.cl的班级数目。


参数:theta
a numeric vector consisting of the strictly positive values of the shrinkage parameter used in the Prediction Analysis. If NULL, a vector consisting of n.theta values for the shrinkage parameter are determined automatically.
一个数值向量组成的严格正的收缩值的预测分析中使用的参数。如果NULL,一个向量组成的n.theta收缩参数值的自动确定。


参数:n.theta
an integer specifying the number of values for the shrinkage parameter of the Prediction Analysis. Ignored if theta is specified.
一个整数,指定的预测分析的收缩参数的值的数目。如果忽略theta指定。


参数:newdata
a numeric matrix composed of the integers between 1 and n.cat. Must have the same number of rows as data, and each row of newdata must contain the same variable as the corresponding row of data. newdata is employed to compute the misclassification rates of the Prediction Analysis for the given values of the shrinkage parameter. If NULL, data is used to determine the misclassification rates.
一个数字1和n.cat之间的整数组成的矩阵。必须有作为data,相同的行数和每行的newdata必须包含相同的变量的相应行data。 newdata的收缩参数给定的值计算误判率的预测分析。如果NULL,data用于确定误判率。


参数:newcl
a numeric vector of length ncol(newdata) that consists of integers between 1 and n.cl, and specifies the class labels of the observations in newdata. Must be specified, if newdata is specified.
一个数值向量的长度ncol(newdata)这是由之间的整数1和n.cl,并在newdata指定的类标签的意见。必须指定的,,如果newdata指定。


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

An object of class pamCat composed of <table summary="R valueblock"> <tr valign="top"><td>mat.chisq</td> <td> a matrix with m rows and n.cl columns consisting of the classwise values of Pearson's ChiSquare statistic for each of the m variables.</td></tr> <tr valign="top"><td>mat.obs</td> <td> a matrix with m rows and n.cat * n.cl columns in which each row shows a contingency table between the corresponding variable and cl.</td></tr> <tr valign="top"><td>mat.exp</td> <td> a matrix of the same size as mat.obs containing the numbers of observations expected under the null hypothesis of an association between the respective variable and cl.</td></tr> <tr valign="top"><td>mat.theta</td> <td> a data frame consisting of the numbers of variables used in the classification of the observations in newdata and the corresponding misclassification rates for a set of values of the shrinkage parameter theta.</td></tr> <tr valign="top"><td>tab.cl</td> <td> a table summarizing the values of the response, i.e.\ the class labels.</td></tr> <tr valign="top"><td>n.cat</td> <td> n.cat.</td></tr> </table>
类的一个对象pamCat组成的<table summary="R valueblock"> <tr valign="top"> <TD> mat.chisq</ TD> <td>一个矩阵m的行n.cl列由Pearson的ChiSquare统计classwise值每个m变量的。</ TD> </ TR> <tr valign="top"> < mat.obs TD> </ TD> <td>一个矩阵m行n.cat * n.cl列,其中每行显示一个列联表之间的对应变量和cl。< / TD> </ TR> <tr valign="top"> <TD>mat.exp</> <td>一个矩阵的大小相同,mat.obs含有根据预期的观测数零假设的各自变量之间的关联和cl。</ TD> </ TR> <tr valign="top"> <TD> mat.theta</ TD> <td>一个数据框包括使用的变量的分类的意见newdata和相应的错误分类比率为一组值的收缩参数theta。</ TD> </ TR> <TR VALIGN =“”> <TD>tab.cl </ TD> <TD>表总结的响应,即\类的标签。</ TD> </ TR> <TR VALIGN =“顶” > <TD> n.cat </ TD> <TD>n.cat。</ TD> </ TR> </ TABLE>


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


Holger Schwender, <a href="mailto:holger.schwender@udo.edu">holger.schwender@udo.edu</a>



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

Schwender, H.\ (2007). Statistical Analysis of Genotype and Gene Expression Data. Dissertation, Department of Statistics, University of Dortmund.

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

predict.pamCat
predict.pamCat


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


# Generate a data set consisting of 2000 rows (variables) and 50 columns.[生成数据集,由2000年列(变量)和50列。]
# Assume that the first 25 observations belong to class 1, and the other[假设在第25观测属于1类,而其他]
# 50 observations to class 2.[50观测到2级。]

mat <- matrix(sample(3, 100000, TRUE), 2000)
rownames(mat) <- paste("SNP", 1:2000, sep = "")
cl <- rep(1:2, e = 25)

# Apply PAM for categorical data to this matrix, and compute the[应用PAM这个矩阵的分类数据,并计算]
# misclassification rate on the training set, i.e. on mat.[在训练集上的错误率,即垫上。]

pam.out <- pamCat(mat, cl)
pam.out

# Now generate a new data set consisting of 20 observations, [立即生成一个新的数据集组成的20个观察值,]
# and predict the classes of these observations using the[这些观察和预测的类使用]
# value of theta that has led to the smallest misclassification[最小分类错误导致的θ值]
# rate in pam.out.[率在pam.out。]

mat2 <- matrix(sample(3, 40000, TRUE), 2000)
rownames(mat2) <- paste("SNP", 1:2000, sep = "")
predict(pam.out, mat2)

# Let's assume that the predicted classes are the real classes[让我们假设预测的类是真正的类]
# of the observations. Then, mat2 can also be used in pamCat[的意见。然后,MAT2也可以被使用在pamCat]
# to compute the misclassification rate. [计算的错误率。]

cl2 <- predict(pam.out, mat2)
pamCat(mat, cl, newdata = mat2, newcl = cl2)



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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-29 20:54 , Processed in 0.023107 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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