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

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

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

                                        Rowwise Cochran-Armitage Trend Test Based on Tables
                                         Rowwise Cochran-Armitage趋势测试基于表

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

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

Given two matrices, each representing one group of subjects (e.g., cases and controls in a case-control study), that summarize the numbers  of subjects showing the different (ordered) levels of the ordinal variables  represented by the rows of the matrices, the value of the Cochran-Armitage Trend Test statistic is computed for each variable.
由于两个矩阵,每一个代表一组受试者(例如,在一项病例对照研究的病例组和对照),总结的主题,显示了不同水平(有序)的有序变量所代表的矩阵的行数, Cochran-Armitage趋势检验统计量的值计算为每个变量。

Using this function instead of rowTrendStats is in particular recommended when the total number of observations is very large.
使用此功能,而不是rowTrendStats是,特别推荐观测时的总人数是非常大的。


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


rowCATTs(cases, controls, scores = NULL, add.pval = TRUE)



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

参数:cases
a numeric matrix in which each row represents one ordinal variable and each column one of the ordered 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。 cases rowwise款项被允许变量之间的不同(这可能会发生一些意见时,缺少一些变量)。


参数: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 ordinal 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款项被允许变量之间的不同(这可能会发生一些意见时,缺少一些变量)。


参数:scores
a numeric vector of length ncol(cases) containing the scores for the different levels. If not specified, i.e.\ NULL, the column names of cases are interpreted as scores.
一个数值向量的长度ncol(cases)包含不同层次的分数。如果未指定,即\NULL,cases的列名被解释为分数。


参数:add.pval
should p-values be added to the output? If FALSE, only the rowwise values of the Cochran-Armitage trend test statistic will be returned. If TRUE, additionally the (raw) p-values based on an approximation to the ChiSquare-distribution with 1 degree of freedom are returned.
p-值应该被添加到输出?如果FALSE,只有rowwise的Cochran-Armitage趋势检验统计量的值将被退回。如果TRUE,另外的(原始)p-值返回一个近似的自由度为1的卡方分布的基础上。


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

Either a vector containing the rowwise values of the Cochran-Armitage trend test statistic (if add.pval = FALSE), or a list containing these values (stats), and the (raw) p-values (rawp) not adjusted for multiple comparisons (if add.pval = TRUE).
要么是矢量含有的rowwise的值的Cochran-Armitage趋势检验统计量(如果add.pval = FALSE),或一个列表,包含这些值(stats),和(原始)对值(<X >)未调整的多重比较(如果rawp“)。


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

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>



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

Agresti, A.\ (2002). Categorical Data Analysis. Wiley, Hoboken, NJ. 2nd Edition.
Armitage, P.\ (1955). Tests for Linear Trends in Proportions and Frequencies.  Biometrics, 11, 375-386.
Cochran, W.~G.\ (1954). Some Methods for Strengthening the Common ChiSquare Tests. Biometrics, 10, 417-451.

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

rowTrendStats, rowMsquares, rowChisq2Class
rowTrendStats,rowMsquares,rowChisq2Class


实例----------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])

# The values of the rowwise Cochran-Armitage trend test [Cochran-Armitage趋势rowwise测试的值]
# are computed by[计算的]

rowCATTs(cases, controls)

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

rowTrendStats(mat, cl)

# or as [或]

out <- rowMsquares(cases, controls)
n <- ncol(mat)
out$stats * n / (n-1)


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

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-30 00:45 , Processed in 0.018972 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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