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

R语言 SpatioTemporal包 make.sigma.B.full()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 13:04:47 | 显示全部楼层 |阅读模式
make.sigma.B.full(SpatioTemporal)
make.sigma.B.full()所属R语言包:SpatioTemporal

                                         The Covariance Matrix for Temporal Trends and beta Fields.
                                         的协方差矩阵时间趋势和β领域。

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

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

Computes the full (cross)-covariance matrix for the beta fields multiplied by the temporal trends; i.e. F*sigmaB*F' where sigmaB is a block diagonal matrix, usually the output from <br> make.sigma.B.
(交叉) - 协方差矩阵计算的测试领域乘以的时间趋势,即F * sigmaB * FsigmaB是块对角矩阵,通常的输出参考make.sigma.B 。


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


make.sigma.B.full(sill, range, loc.ind1, loc.ind2 = loc.ind1,
                  F1, F2 = F1, dists)



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

参数:sill, range
Vectors with the sill and range parameters for each of the block matrices.  
每个分块矩阵的阈值和范围参数向量。


参数:loc.ind1,loc.ind2
Vectors indicating which location the rows in F1 and F2 corresponds to, usually mesa.data.model$obs$idx.  
向量哪个位置F1和F2相对应,通常是mesa.data.model$obs$idx中的行。


参数:F1,F2
(number of obs.) - by - (number of temporal trends) matrices containing the temporal trends. Usually mesa.data.model$F, where mesa.data.model is obtained from create.data.model.  
(观察) - 由 - (时间趋势)矩阵的时间趋势。通常是mesa.data.model$F,mesa.data.model是从create.data.model。


参数:dists
Distance matrix giving the distances between the (observed) locations.  
给予(实测值)的位置之间的距离的距离矩阵。


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

Returns the covariance or cross-covariance matrix F'*sigmaB*F.
返回的协方差或互协方差矩阵F* sigmaB * F。


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



Johan Lindstr枚m




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

make.sigma.B, make.sigma.nu
make.sigma.B,make.sigma.nu

This function is called by loglike.
此功能被称为loglike。


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


##First create some random locations[#首先创建一些随机的位置]
x <- rnorm(3)
y <- rnorm(3)

##compute distance matrix[#计算距离矩阵]
D <- as.matrix(dist( cbind(x,y) ))

##create a trend[#创建一个趋势]
trend <- cbind(rep(1,5),sin(1:5))
##an index of locations[#索引的位置]
idx <- c(rep(1:3,3),1:2,2:3)
##expand the F matrix to match the locations/times in idx/T.[扩大的F矩阵IDX / T相匹配的地点/时间]
F <- trend[c(rep(1:3,each=3),4,4,5,5),]

##compute F*sigmaB*F'[#计算F * sigmaB * F]
FsigmaF <- make.sigma.B.full(c(2,1), c(.3,1), loc.ind1=idx,
                             F1=F, dists=D)

##create the full F matrix[#创建完整的F矩阵]
Falt <- matrix(0,dim(F)[1],dim(F)[2]*max(idx))
for(i in 1:dim(F)[1]){
  Falt[i,c(idx[i],idx[i]+max(idx))] <- F[i,]
}
##and compute F*sigmaB*F' using full matrices[#和计算F * sigmaB * F使用全矩阵]
sigma.B <- make.sigma.B(c(2,1), c(.3,1), D)
FsigmaF.alt <- Falt %*% sigma.B %*% t(Falt)

##compare the results[#比较的结果。]
range(FsigmaF - FsigmaF.alt)

##use the function to compute a cross covariance[#使用函数来计算的交叉协方差]
FsigmaF.cross <- make.sigma.B.full(c(2,1), c(.3,1), loc.ind1=idx[1:6],
      loc.ind2=idx[7:13], F1=F[1:6,], F2=F[7:13,], dists=D)

##compare to the relevant part of the full matrix[#比较全矩阵的相关部分]
range(FsigmaF.cross-FsigmaF[1:6,7:13])


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


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

使用道具 举报

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

本版积分规则

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

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

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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