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

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

[复制链接]
发表于 2012-9-30 09:14:59 | 显示全部楼层 |阅读模式
utils(simPopulation)
utils()所属R语言包:simPopulation

                                         Weighted mean, variance, covariance matrix and correlation matrix
                                         加权平均数,方差,协方差矩阵和相关矩阵

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

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

Compute mean, variance, covariance matrix and correlation matrix, taking into  account sample weights.
计算均值,方差,协方差矩阵和相关矩阵,考虑样本权重。


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


meanWt(x, weights, na.rm = TRUE)

varWt(x, weights, na.rm = TRUE)

covWt(x, ...)

## Default S3 method:[默认方法]
covWt(x, y, weights, ...)

## S3 method for class 'matrix'
covWt(x, weights, ...)

## S3 method for class 'data.frame'
covWt(x, weights, ...)

corWt(x, ...)

## Default S3 method:[默认方法]
corWt(x, y, weights, ...)

## S3 method for class 'matrix'
corWt(x, weights, ...)

## S3 method for class 'data.frame'
corWt(x, weights, ...)



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

参数:x
for meanWt and varWt, a numeric vector.  For  covWt and corWt, a numeric vector, matrix or  data.frame.
meanWt和varWt,一个数字矢量。对于covWt和corWt,一个数值向量,矩阵或data.frame。


参数:y
a numeric vector.  If missing, this defaults to x.
一个数值向量。如果缺少,这默认为x的。


参数:weights
an optional numeric vector containing sample weights.
一个可选的数字向量的样本权重。


参数:na.rm
a logical indicating whether any NA or NaN values  should be removed from x before computation.  Note that the default  is TRUE.
一个逻辑说明是否有任何NA或应该从NaN值x之前计算。请注意,默认的是TRUE。


参数:...
for the generic functions covWt and corWt,  additional arguments to be passed to methods.  Additional arguments not  included in the definition of the methods are ignored.
的通用功能covWt和corWt,额外的参数被传递到方法。的方法的定义中不包括的额外的参数将被忽略。


Details

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

meanWt is a simple wrapper that calls mean(x, na.rm=na.rm) if  weights is missing and weighted.mean(x, w=weights, na.rm=na.rm)  otherwise.
meanWt是一个简单的包装,要求mean(x, na.rm=na.rm)如果weights失踪,weighted.mean(x, w=weights, na.rm=na.rm)否则。

varWt calls var(x, na.rm=na.rm) if weights is missing.
varWt调用var(x, na.rm=na.rm)如果weights丢失。

covWt and corWt always remove missing values pairwise and  call cov and cor, respectively, if weights is missing.
covWt和corWt总是删除缺失值的配对,并呼吁cov和cor,分别weights如果缺少。


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

For meanWt, the (weighted) mean.
对于meanWt,(加权)的意思。

For varWt, the (weighted) variance.
对于varWt,(加权)变异。

For covWt, the (weighted) covariance matrix or, for the default  method, the (weighted) covariance.
对于covWt,(加权)的协方差矩阵,为默认的方法,(加权)协方差。

For corWt, the (weighted) correlation matrix or, for the default  method, the (weighted) correlation coefficient.
对于corWt,相关矩阵(加权),或为默认的方法,相关系数(加权)。


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



Stefan Kraft and Andreas Alfons




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

mean, weighted.mean,  var, cov,  cor
mean,weighted.mean,var,cov,cor


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


data(eusilcS)
meanWt(eusilcS$netIncome, weights=eusilcS$rb050)
sqrt(varWt(eusilcS$netIncome, weights=eusilcS$rb050))

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-24 21:11 , Processed in 0.025712 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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