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

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

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

                                        Rowwise Linear Trend Tests
                                         Rowwise线性趋势检验

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

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

Computes for each row of a matrix the value of the statistic of a linear trend test for testing whether the ordinal variable corresponding to the row of the matrix is associated with an ordinal response.
计算一个矩阵的每一行的值的统计测试是否对应的矩阵的行的序号的变量相关联的一个序响应的线性趋势检验。

In the two-class case, the statistic of the Cochran-Armitage trend test is computed by default.
在2级的情况下,默认的Cochran-Armitage趋势检验统计量的计算方法是。


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


rowTrendStats(X, y, use.n = NULL, add.pval = TRUE)



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

参数:X
a numeric matrix in which each row represents an ordinal variable and each column corresponds to an observation. The entries of this matrix are interpreted as scores for the different (ordered) levels of the respective variables.
一个数值的矩阵,其中每一行代表一个定序变量,并且每一列对应于一个观测。此矩阵的条目被解释为不同的(有序的)的水平相应的变量作为评分。


参数:y
a numeric vector of length ncol(X) containing the class labels of the observations represented by the columns of X, where these labels are interpreted as scores for the different classes.
一个数值向量的长度ncol(X)包含类标签的列所代表的意见X,这些标签被解释为不同类别的分数。


参数:use.n
should the squared values of Pearson's correlation coefficient be multiplied by ncol(X) to generate the values of the test statistic? If FALSE, the squared values are multiplied by ncol(X) - 1. By default, the squared values are multiplied by ncol(X) if y shows two levels, leading to the Cochran-Armitage test of trend. Otherwise, they are multiplied by ncol(X) - 1 leading to the linear trend test statistic of Mantel (1963) described, e.g., on page 87 of Agresti (2002).
Pearson相关系数的平方值应乘以ncol(X)生成的检验统计量的值?如果FALSE,平方值乘以ncol(X) - 1。默认情况下,平方值乘以ncol(X)如果y显示了两层,科克伦 - 阿米蒂奇测试的趋势。否则,它们乘以ncol(X) - 1导致的线性趋势检验统计量的曼特尔(1963)描述,例如,阿格雷斯蒂(2002年)第87页。


参数: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的卡方分布的基础上。


(作者)----------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.
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----------

rowMsquares, rowCATTs, rowChisqMultiClass
rowMsquares,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 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(0:1, e=25)

# The values of the Cochran-Armitage trend test can[Cochran-Armitage趋势测试的值]
# then be computed by[然后计算]

rowTrendStats(mat, cl)

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

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

rowCATTs(cases, controls)

# 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-12-2 03:17 , Processed in 0.026402 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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