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

R语言 yaImpute包 impute.yai()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-10-2 07:30:06 | 显示全部楼层 |阅读模式
impute.yai(yaImpute)
impute.yai()所属R语言包:yaImpute

                                        Impute variables from references to targets
                                         插补变量引用的目标

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

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

Imputes the observation for variables from a reference observation to a target observation. Also, imputes a value for a reference from other references. This practice is useful for validation (see yai). Variables not available in the original data may be imputed using argument ancillaryData.
责难的观察变量的参考观察到一个观察的目标。此外,归咎于其他参考文献的引用的值。这种做法非常有用的验证(见yai)。在原始数据变量不被归咎于使用参数ancillaryData。


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


## S3 method for class 'yai'
impute(object,ancillaryData=NULL,method="closest",
           method.factor=method,k=NULL,vars=NULL,
           observed=TRUE,...)



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

参数:object
an object of class yai.
对象类yai。


参数:ancillaryData
a data frame of variables that may not have been used in the original call to yai. There must be one row for each reference observation, no missing data, and row names must match those used in the reference observations.
一个数据框的变量,可能没有被用于在原始呼叫yai。必须有一排的每个参考观察,没有丢失的数据,并且行名必须匹配参考观测中所使用的。


参数:method
the method used to compute the imputed values for continuous variables, as follows: <br> closest: use the single neighbor that is closest (this is the default and is always used when k=1); <br> mean: an average over the k neighbors is taken;<br> dstWeighted: a weighted average is taken over the k neighbors where the weights are 1/(1+d).
所采用的方法计算的估算值连续变量,如下所示:<BR>closest:使用单一的邻居说,最近的(这是默认的,一般用来当k = 1);参考 mean:在k个近邻平均取; <br>文章dstWeighted:被接管的加权平均的权重为1 /(1 + d)的第k邻居。


参数:method.factor
the method used to compute the imputed values for factors, as follows: <br> closest: use the single neighbor that is closest (this is the default and is always used when k=1); <br> mean: actually is the mode\-\-it is the factor level that occurs the most often among the k neighbors;<br> dstWeighted: a mode where the count is the sum of the weights (1/(1+d)) rather than each having a weight of 1.
所采用的方法计算的估算值的因素,如下所示:<BR>closest:使用单一的邻居说,最近的(这是默认的,一般用来当k = 1);参考 X>:其实是模式\  -  \  - 这是最经常发生在K邻居因子水平; <BR> mean:计数的模式下的权重总和(1 / (1 + d)的),而不是每个具有权重为1。


参数:k
the number neighbors to use in averages, when NULL all present are used.
邻居数时使用的平均水平,NULL所有目前正在使用。


参数:vars
a character vector of variables to impute, when NULL, the behaviour depends on the value of ancillaryData: when it is NULL, the Y-variables are imputed others all present in ancillaryData are imputed.
字符变量的向量推诿,NULL,其行为取决于价值的ancillaryData:它是NULL时,Y-变量估算人所有目前在ancillaryData归咎于。


参数:observed
when TRUE, columns are created for observed values (those from the target observations) as well as imputed values (those from the reference observations.
为TRUE时,列创建的观测值(从目标观测)以及插补值(从基准观测。


参数:...
passed to other methods, currently not used.
通过其他方法,目前未使用。


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

An object of class impute.yai, which is a data frame with rownames identifying observations and column names identifying variables. When observed=TRUE additional columns are created with a suffix of .o. <br><br> NA's fill columns of observed values when no corresponding value is known, as in the case for Y-variables from target observations.<br><br> Scale factors for each variable are returned as an attribute (see attributes).
对象的类impute.yai,这是一个数据框的行名标识识别变数的观察和列名。当实测值= TRUE额外的列创建一个后缀,O。返回参考参考不适用的填充列的观测值,当没有相应的值是已知的,如在的情况下的Y变量从目标观测。<BR> <BR>比例因子为每个变量作为一个属性(见 attributes“)。


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



Nicholas L. Crookston <a href="mailto:ncrookston.fs@gmail.com">ncrookston.fs@gmail.com</a> <br>
Andrew O. Finley <a href="mailto:finleya@msu.edu">finleya@msu.edu</a> <br>
Emilie Grossmann <a href="mailto:Emilie.Grossmann@oregonstate.edu">Emilie.Grossmann@oregonstate.edu</a>




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

yai
yai


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


require(yaImpute)

data(iris)

# form some test data[形成一些测试数据。]
refs=sample(rownames(iris),50)
x &lt;- iris[,1:3]      # Sepal.Length Sepal.Width Petal.Length[Sepal.Length Sepal.Width Petal.Length]
y &lt;- iris[refs,4:5]  # Petal.Width Species[Petal.Width物种]

# build a yai object using mahalanobis[建立一个合艾对象使用马氏]
mal <- yai(x=x,y=y,method="mahalanobis")

# output a data frame of observed and imputed values[输出一个数据框的观察和估算值]
# of all variables and observations.[所有变量和意见。]

impute(mal)
malImp=impute(mal,ancillaryData=iris)
plot(malImp)


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-24 10:39 , Processed in 0.024288 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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