drop.observations(SpatioTemporal)
drop.observations()所属R语言包:SpatioTemporal
Drop Observations from mesa.data.model
观测的mesa.data.model
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Drops observations from mesa.data.model, removing marked observations along with the corresponding locations and recomputes a number of relevant elements. Used by the cross-validation functions estimateCV and predictCV.
丢弃观测mesa.data.model,消除显着的观测伴随着相应的位置,并重新计算了一些相关的元素。所使用的交叉验证功能estimateCV和predictCV。
用法----------Usage----------
drop.observations(mesa.data.model, Ind.cv)
参数----------Arguments----------
参数:mesa.data.model
Data structure holding observations, and information regarding the observation locations. See create.data.model and mesa.data.model.
数据结构保持的观察,和有关的观察位置。见create.data.model和mesa.data.model。
参数:Ind.cv
A logical vector with one element per observation in <br> mesa.data.model$obs. Observations marked with the TRUE will be <br> dropped from the data structure. Use createCV to create the logical vector.
一个逻辑向量与参考mesa.data.model$obs观察每一个元素。观察标有TRUE的是从数据结构<BR>下降。使用createCV创建的逻辑向量。
值----------Value----------
Returns the mesa.data.model without the observations marked by Ind.cv. Any locations that lack observations as a result of this removal are also excluded from the returned structure.
返回的mesa.data.model没有标记Ind.cv的意见。的任何位置,缺乏作为这种删除操作的结果的观测从返回的结构也被排除在外。
(作者)----------Author(s)----------
Johan Lindstr枚m
参见----------See Also----------
See also createCV, estimateCV, and predictCV.
请参阅createCV,estimateCV,predictCV。
实例----------Examples----------
##load data[#加载数据]
data(mesa.data.model)
##Mark 30% of observations[#标记的观测值的30%]
I <- runif(dim(mesa.data.model$obs)[1])<.3
##drop these observations[#删除这些意见]
mesa.data.new <- drop.observations(mesa.data.model, I)
##This reduces the remaining number of observations[这减少了剩余的若干意见]
printMesaDataNbrObs(mesa.data.model)
printMesaDataNbrObs(mesa.data.new)
##create cross validation structure[#创建交叉验证结构]
Icv <- createCV(mesa.data.model, groups = 10)
##drop observations from the second CV group[#下降从第二CV组的观察]
mesa.data.new <- drop.observations(mesa.data.model, Icv[,2])
##This reduces the remaining number of observations (and locations)[这减少了剩余的若干意见(和地点)]
printMesaDataNbrObs(mesa.data.model)
printMesaDataNbrObs(mesa.data.new)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|