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

R语言 SpatioTemporal包 mesa.data.raw()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 13:05:17 | 显示全部楼层 |阅读模式
mesa.data.raw(SpatioTemporal)
mesa.data.raw()所属R语言包:SpatioTemporal

                                         Example of raw data
                                         实施例的原始数据

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

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

The raw data that was used to create the mesa.data and mesa.data.model structures.
的原始数据被用来创建mesa.data和mesa.data.model结构。


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


data(mesa.data.raw)



格式----------Format----------

The structure contains observations, temporal trends, locations, geographic covariates, and spatio-temporal covariates. The data is stored in a list with elements:
该结构包含了观测,时间趋势,位置,GEO协变量,与时空协变量。该数据被存储在一个列表中,其中包含元素:




X A data.frame containing names, locations, and (geographic) covariates regarding all the (observation) locations.
XA数据框的名称,位置,和(GEO)协变量关于所有(观察)的位置。




obs A time-by-location matrix for the observed data.
OB的时间位置矩阵所观察到的数据。




trend A data.frame containing the smooth temporal trends.
趋势数据框平滑的变化趋势。




lax.conc.1500 A time-by-location matrix of a spatio-temporal covariate based on output from Caline3QHC.
lax.conc.1500甲时间位置的时空协变量的基础上输出Caline3QHC矩阵。


Details

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

The data structure contains raw data from the <STRONG>MESA Air</STRONG> project. The example below describes how to create the mesa.data structure from raw data.
数据结构包含原始数据的<STRONG>梅萨航空</ STRONG>项目。下面的例子介绍了如何创建mesa.data从原始数据结构。


源----------Source----------

Contains monitoring data from the <STRONG>MESA Air</STRONG> project, see Cohen et.al. (2009) for details.
包含从<STRONG>梅萨航空</ STRONG>项目的监测数据,参见Cohen等人(2009)的详细信息。


参考文献----------References----------

D. Hardie, A. Ho, P. Kinney, T. V. Larson, P. D. Sampson, L. Sheppard, K. D. Stukovsky, S. S. Swan, L. S. Liu, J. D. Kaufman. (2009) Approach to Estimating Participant Pollutant Exposures in the Multi-Ethnic Study of Atherosclerosis and Air Pollution (MESA Air). Environmental Science &amp; Technology: 43(13), 4687-4693.

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

See mesa.data and create.data.model.
见mesa.data和create.data.model。

For other data functions, see mesa.data.model, create.data.matrix, <br> construct.LUR.basis and default.LUR.list.
其它数据功能,请参阅mesa.data.model,create.data.matrix,参考construct.LUR.basis和default.LUR.list。


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


##load the data[#加载的数据。]
data(mesa.data.raw)

##create the location data.frame[#创建位置数据框]
location <- mesa.data.raw$X[,c("ID","x","y","long","lat","type")]
##ensure that it's a data.frame[#确保它是一个数据框]
location <- as.data.frame(location)
##ensure that ID and ID are factors[#确保ID和ID的因素]
location$ID <- factor(as.character(location$ID))
location$type <- factor(as.character(location$type))

##extract the covariate LUR matrix[#提取土地使用权矩阵协]
LUR <- mesa.data.raw$X
##ensure that it's a data.frame[#确保它是一个数据框]
LUR <- as.data.frame(LUR)
##set rownames to the IDs and drop location information[#设置行名的ID和放置位置信息]
rownames(LUR) <- as.character(LUR$ID)
LUR <- LUR[,!(names(LUR) %in% c("ID","x","y","long","lat","type"))]

##create matrices of observation times[#创建矩阵的观测时间。]
T <- t(matrix(rownames(mesa.data.raw$obs),
              nrow=dim(mesa.data.raw$obs)[2],
              ncol=dim(mesa.data.raw$obs)[1],byrow=TRUE))
##...and locations[#...和地点]
ID <- matrix(colnames(mesa.data.raw$obs), nrow=dim(mesa.data.raw$obs)[1],
             ncol=dim(mesa.data.raw$obs)[2],byrow=TRUE)
##let's study these matrices[#让我们来研究这些矩阵]
print(T[1:5,1:5])
print(ID[1:5,1:5])

##combine with the observations[#与观测相结合]
obs <- data.frame(obs=c(mesa.data.raw$obs), date=as.Date(T),
                  ID=c(ID))
##drop unmonitored locations[#下降不受监督的位置。]
obs <- obs[!is.na(obs$obs),,drop=FALSE]
##sort the locations (strictly not needed)[#排序的位置(严格不需要)]
obs <- obs[order(obs$date,obs$ID),,drop=FALSE]

##compute the smooth trends[#计算的顺利发展趋势。]
trend <- calc.smooth.trends(obs=obs$obs, date=obs$date,
                            ID=obs$ID, n.basis = 2)$svd

##create a 3D-array for the spatio-temporal covariate[#创建一个三维阵列的时空协]
ST <- array(mesa.data.raw$lax.conc.1500, dim =
            c(dim(mesa.data.raw$lax.conc.1500),1))
##add names for time, location and which spatio-temporal covariate[#添加名称,时间,地点和时空协]
dimnames(ST) <- list(rownames(mesa.data.raw$lax.conc),
                     colnames(mesa.data.raw$lax.conc),
                     "lax.conc.1500")

##combine to a mesa.data-object.[#结合到mesa.data对象。]
mesa.data.alt <- list(location=location, LUR=LUR, trend = trend,
                      obs=obs, SpatioTemp=ST)

##This should be the same as the data in mesa.data[#这应该是相同的作为mesa.data中的数据]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-11 05:06 , Processed in 0.026420 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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