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

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

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

                                        Rowwise Linear Trend Test Based on Tables
                                         基于表的Rowwise线性趋势分析

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

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

Given a set of 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 levels of the categorical variables  represented by the rows of the matrices, the value of the linear trend statistic based on Pearson's correlation coefficient and described on page 87 of Agresti (2002) is computed for each variable.
给定一组矩阵,每一个代表一组受试者(例如,在一项病例对照研究的病例组和对照),总结的主题,显示了不同的分类变量所代表的矩阵的行数,该值计算每个变量的线性趋势统计的Pearson相关系数和描述的基础上,阿格雷斯蒂第87页(2002年)。

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


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


rowMsquares(..., listTables = NULL, clScores = NULL, levScores = NULL,
   add.pval = TRUE)



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

参数:...
numeric matrices in each of which each row corresponds to a ordinal variable and each column to one of the ordered levels of these variables. Each of these matrices represents one of the groups of interest and comprises the numbers of observations showing  the respective levels at the different variables. These matrices can, e.g., generated by employing rowTables. 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. The rowwise sums in a matrix are allowed to differ (which might happen if some of the observations are missing for some of the variables.)
其中每个数字矩阵中每一行对应于一个序号的变量和每个列的这些变量的一个有序水平。这些矩阵中的每一个表示一个景点的基团和包括的数字示出在不同的变量的各水平的观察。这些矩阵可以,例如,生成的,由用人rowTables。的所有矩阵的尺寸必须是相同的,以及行和列必须代表相同的变量和水平,分别以相同的顺序在所有矩阵。总结在一个矩阵rowwise允许不同的(这可能会发生,如果一些观测缺少的一些变量。)


参数:listTables
instead of inputting the matrices directly, a list consisting of these matrices can be generated and then be used in rowMsquares  by specifying listTables.
代替直接输入矩阵,这些矩阵组成的列表可以被产生,然后,可以使用在rowMsquares通过指定listTables。


参数:clScores
a numeric vector with one entry for each matrix specifying the score that should be assigned to the corresponding group. If NULL, clScores is set to 1:m, where m is the number of groups/matrices, such that the first input matrix (or the first entry in listTables) gets a score of 1, the second a score of 2, and so on.
用一个入口用于指定应该被分配到相应的组的得分,每个矩阵的一个数值向量。如果NULL,clScores设置为1:m,其中m是多少组/矩阵,这样,第一个输入矩阵(或中的第一项<X >),得到得分为1,第二个得分为2,依此类推。


参数:levScores
a numeric vector with one score for each level of the variables.If not specified,  i.e.\ NULL, the column names of the matrices are interpreted as scores.
一个数值向量一个得分的未指定的variables.If的每个级别,即\NULL,矩阵的列名被解释为分数。


参数:add.pval
should p-values be added to the output? If FALSE, only the rowwise values of the linear 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的的线性趋势检验统计量的值将返回。如果TRUE,另外的(原始)p-值返回一个近似的自由度为1的卡方分布的基础上。


Details

详细信息----------Details----------

This is an extension of the Cochran-Armitage trend test from two to several classes. The statistic of the Cochran-Armitage trend test can be obtained by multiplying the statistic of this general linear trend test with n / (n - 1), where n is the number of observations.
这是一个扩展的Cochran-Armitage趋势检验从两个到几个类。统计Cochran-Armitage趋势测试可以通过这个一般的线性趋势检验统计量乘以n / (n - 1),n的若干意见。


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

Either a vector containing the rowwise values of the linear 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的线性趋势检验统计量的值(如果add.pval = FALSE),或包含这些值的列表(stats),和(原始)对值(rawp多重比较)不调整(如果add.pval = TRUE)。


注意----------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.
Mantel, N.\ (1963). Chi-Square Test with one Degree of Freedom: Extensions of the Mantel-Haenszel Procedure. Journal of the American Statistical Association, 58, 690-700.

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

rowTrendStats, rowCATTs, rowChisqMultiClass
rowTrendStats,rowCATTs,rowChisqMultiClass


实例----------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 we consider a case-control study,[现在,假设我们考虑的病例对照研究,]
# i.e. two groups, and that the first 25 columns [即两组,和第25列]
# of mat correspond to cases and the remaining 25 [垫相对应的情况下,其余25]
# columns to cases. Then 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 liner trend test are[班轮趋势的rowwise测试值]
# computed by[计算方法]

rowMsquares(cases, controls)

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

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

# or as[或]

rowTrendStats(mat, cl, use.n = FALSE)

# or as[或]

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


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

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-29 22:55 , Processed in 0.024732 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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