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

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

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

                                        Rowwise Pearson's ChiSquare Test Based on Tables
                                         基于表的Rowwise Pearson的卡方检验

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

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

Given a set of matrices, each of which represents one group of subjects, and summarizes rowwise the numbers of these observations showing the levels of the categorical variables represented by the rows of the matrices, the value of Pearson's ChiSquare statistic for testing whether the distribution of the variable differs between the different groups is computed for each variable.
一套矩阵,其中每一个代表一组受试者,并总结rowwise这些观测示出的水平分类变量代表的矩阵的行的数目,该值Pearson的卡方统计测试的分布是否变量不同组之间的不同,计算为每个变量。

Using this function instead of rowChisqStats is recommended when the total number of observations is very large.
使用此功能,而不是rowChisqStats建议,观测时的总人数是非常大的。


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


rowChisq2Class(cases, controls, add.pval = TRUE, sameNull = FALSE)

rowChisqMultiClass(..., listTables = NULL, add.pval = TRUE,
   sameNull = FALSE)



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

参数:cases
a numeric matrix in which each row represents one categorical variable and each column one of the levels that the variables exhibit. The entries of this matrix are the numbers of observations from one group (e.g., the cases in a case-control study) showing a particular level at the different variables. Such a matrix can, e.g., be generated by rowTables.The rowwise sums of cases are allowed to differ between variables (which might happen when some of the observations are missing for some of the variables).
一个数字矩阵中的每一行代表一个分类变量和每个列中的变量表现出的水平。这个矩阵的条目的数量从一个组(例如,在一项病例对照研究的情况下),显示不同的变量在某一特定水平的观察。 ,例如,这样的矩阵可以被生成的rowTables的rowwise总和cases允许变量(它可能发生时,某些观测缺少某些变量)之间的不同。


参数:controls
a numeric matrix of the same dimensions as cases comprising the numbers of observations from the second group (e.g., the controls in a case-control study) that show the respective level at the different variables. The rows of controls must represent the same variables in the same order as cases, and the columns must represent the same levels in the same order. This matrix can also be generated by employing rowTables. The rowwise sums of controls are allowed to differ between variables (which might happen when some of the observations are missing for some of the variables).
一个数字矩阵的尺寸相同,cases观测包括数字从第二组(例如,一项病例对照研究中的控件),展示了各自在不同的变量。的行controls必须代表相同的顺序cases相同的变量中,并以相同的顺序,列必须代表相同的水平。此矩阵也可以通过采用rowTables生成。 controls rowwise款项被允许变量之间的不同(这可能会发生一些意见时,缺少一些变量)。


参数:...
numeric matrices (such as cases and controls) each of which comprises the numbers of observations showing the respective levels at the different variables. The dimensions of all matrices must be the same, and the rows and columns must represent the same variables and levels, respectively, in the same order in all matrices.
数字矩阵(如cases和controls)的每一个,它包括的数字示出在不同的变量的各水平的观察。的所有矩阵的尺寸必须是相同的,以及行和列必须代表相同的变量和水平,分别以相同的顺序在所有矩阵。


参数:listTables
instead of inputting the matrices directly into rowChisqMultiClass a list can generated, where each entry of this list is one of matrices, and this list can be used in rowChisqMultiClass by specifying listTables.
而不是直接输入矩阵成rowChisqMultiClass列表可以产生的,此列表,其中每个条目是一个矩阵,并且此列表可以用来通过指定rowChisqMultiClass在listTables。


参数:add.pval
should p-values be added to the output? If FALSE, only the rowwise values of Pearson's ChiSquare statistic will be returned. If TRUE, additionally the degrees of freedom and the (raw) p-values are computed by assuming approximation to the ChiSquare-distribution, and added to the output.
p-值应该被添加到输出?如果FALSE,只有rowwise的Pearson的卡方统计值将返回。如果TRUE,附加的程度的自由和(原始)p-值计算由假定的卡方分布近似,并添加到输出。


参数:sameNull
should all variables follow the same null distribution? If TRUE, then all variables must show the same number of levels such that their null distribution is approximated by the same ChiSquare-distribution.
所有的变量应遵循相同的空分布?如果TRUE,然后所有的变量必须显示相同数目的水平,使得它们的空分布近似相同的卡方分布。


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

Either a vector containing the rowwise values of Pearson's ChiSquare statistic (if add.pval = FALSE) or a list containing these values (stats), the degrees of freedom (df), and the p-values (rawp) not adjusted for multiple comparisons (if add.pval = TRUE).
无论是一个向量,包含rowwise Pearson的卡方统计量的值(如果add.pval = FALSE)或包含这些值的列表(stats),自由度(df),以及在p-值如果(rawp)未调整的多重比较(add.pval = TRUE“)。


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

In the case of a 2 x 2 table, no continuity correction is applied. In this case, the results of rowChisq2Class and rowChisMultiClass are only equal to the results of chisq.test if in the latter correct = FALSE is used.
在一个2×2表的情况下,没有连续性校正被施加。在这种情况下,rowChisq2Class和rowChisMultiClass只等于chisq.test如果在后者的correct = FALSE使用的结果的结果。

The usual contingency table for a variable can be obtained from the matrices by forming a variable-specific matrix in which each row consists of the row of one of these matrices.
通常的应变表为一个变量,可以得到从通过形成特定一个可变的矩阵中的每一行包括这些矩阵的行的一个矩阵。


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


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



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

rowChisqStats, rowTables, rowCATTs,
rowChisqStats,rowTables,rowCATTs,


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


# Generate a matrix containing data for 10 categorical [包含10分类数据生成矩阵]
# variables with levels 1, 2, 3.[级别1,2,3的变量。]

mat <- matrix(sample(3, 500, TRUE), 10)

# Now assume that the first 25 columns correspond to[现在,假设第25列对应]
# cases and the remaining 25 columns to cases. Then[的情况下,其余25列的情况。然后]
# a vector containing the class labels is given by[一个向量,包含类的标签]

cl <- rep(1:2, e=25)

# and the matrices summarizing the numbers of subjects[和矩阵总结的题材的数目]
# showing the respective levels at the different variables[示出在不同的变量的各水平]
# are computed by[计算的]

cases <- rowTables(mat[, cl==1])
controls <- rowTables(mat[,cl==2])

# To obtain the ChiSquare values call[为了获得卡方值调用]

rowChisq2Class(cases, controls)

# This leads to the same results as[这导致的结果是相同]

rowChisqStats(mat, cl)

# or[或]

rowChisqMultiClass(cases, controls)

# or[或]

listTab <- list(cases, controls)
rowChisqMultiClass(listTables = listTab)

  
## End(Not run)[#(不执行)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-29 22:44 , Processed in 0.021826 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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