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

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

[复制链接]
发表于 2012-10-1 16:56:12 | 显示全部楼层 |阅读模式
wc(WaveletCo)
wc()所属R语言包:WaveletCo

                                        Wavelet Coherence Analysis
                                         小波相干分析

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

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

The main function of this package; conducts the wavelet coherence analysis
这个包的主要功能进行了小波相干分析


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


wc(x, y, start = 0, dt = 10, dj = 1/20, method = "white.noise", lowerPeriod = 2 * dt, upperPeriod = floor(length(x)/3) * dt, no.bs = 100, plot = TRUE)



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

参数:x
time series x
时间序列x


参数:y
time series y
时间序列y


参数:start
The start point of time axis
时间轴上的开始点


参数:dt
Sampling resolution on temporal field
时间领域的采样分辨率


参数:dj
Sampling resolution on frequency field
频域采样分辨率


参数:method
the method of generating surrogate time series
生成替代时间序列的方法


参数:lowerPeriod
Lower period of wavelet decomposition
下期小波分解


参数:upperPeriod
upper period of wavelet decomposition
上期小波分解


参数:no.bs
the number of bootstrap
的数目自举


参数:plot
if TRUE, then plot the result
如果为TRUE,则绘制的结果


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


Huidong Tian, Bernard Cazelles



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



x <- c(1.50* sin(seq(0, 30*pi, length.out = 70)) +
     rnorm(70, sd = .25), rnorm(30, sd = 1.25)) +
     sin(seq(0, 10*pi, length.out = 100))*2 +
     seq(4, -4, length.out = 100)

y <- c(1.25* sin(seq(0, 30*pi, length.out = 70)+7*pi/8) +
     rnorm(70, sd = .25), rnorm(30, sd = 1.25) ) +
     sin(seq(0, 10*pi, length.out = 100))*2 +
     seq(-4, 4, length.out = 100)

ns <- 200
WC <- wc(x, y, no.bs = ns, dt= 1, start = 1909, plot = FALSE)

##############################[#############################]

f.n =  2      
f.h =  25/25.4
m.t =  0.5;
m.b =  1.5     
m.1 =  1;
m.2 =  3;
m.3 =  1;
m.4 =  2   

W = 120/25.4
H = f.n*(f.h + (m.1+m.3)*4/30)+ (m.t + m.b)*4/30

tick0 = 0.025;
tick1 = tick0*f.h/(.15*W-m.4*4/30)

fig.h = (f.h + (m.1+m.3)*4/30)/H
fig.b = m.b*4/30/H

fig.w = list(); for(i in 1:f.n) fig.w[[i]] = c( 0,.8, fig.b + (f.n-i)*fig.h,fig.b + (f.n+1-i)*fig.h)
fig.p = list(); for(i in 1:f.n) fig.p[[i]] = c(.8,1, fig.b + (f.n-i)*fig.h,fig.b + (f.n+1-i)*fig.h)
#############################################[############################################]
x11(W,H,pointsize = 8)

## plot #1[#图#1]
  par(fig = fig.w[[1]],mar = c(m.1,m.2,m.3,0))
  plot (seq(1909, length.out= 100), x, type = "o", ylim = c(min(x, y), max(x, y)), pch = 19, axes = FALSE, xaxs = "i")
  abline(lm(x~seq(1909, length.out= 100)), lwd = 2)
  lines(seq(1909, length.out= 100), y, type = "o", pch = 21, col = "red")
  abline(lm(y~seq(1909, length.out= 100)), lwd = 2, col = "red")
  box(lwd = .25)
  axis(1,lwd = .25,at = seq(1920, 2000, 20),label = NA,tck = tick0)
  axis(2,lwd = .25,at = seq(-3, 3, 3),label = NA,tck = tick0)
  mtext(seq(1920, 2000, 20),side = 1,at = seq(1920, 2000, 20),cex = 7/8)
  mtext(seq(-3, 3, 3),side = 2,at = seq(-3, 3, 3),cex = 7/8,las = 1,line = .1)
  mtext('(a)',side = 3,at = 1900,line = 0.1,font = 2,adj = 0)
  mtext('Time series',side = 2,line = 1.5,font = 1)

## plot #2[#2#号图]
  par(fig = fig.w[[2]],mar = c(m.1,m.2,m.3,0), new = TRUE)
  wc.image(WC)
  axis(1,lwd = .25,at = seq(1920, 2000, 20),label = NA,tck = tick0)
  axis(2,lwd = .25,at = seq(1, 5),label = NA,tck = tick0)
  mtext(seq(1920, 2000, 20),side = 1,at = seq(1920, 2000, 20),cex = 7/8)
  mtext(2^seq(1, 5),side = 2,at = seq(1, 5),cex = 7/8,las = 1,line = .1)
  mtext('(b)',side = 3,at = 1900,line = 0.1,font = 2,adj = 0)
  mtext('Period',side = 2,line = 1.5,font = 1)
  mtext('Year',side = 1,line = 1)
  
  par(fig = fig.p[[2]],mar = c(m.1,0,m.3,m.4),new = TRUE)
  wc.power(WC)
  axis(1,lwd = .25,at = seq(.7, 1, .1),label = NA,tck = tick0)
  axis(4,lwd = .25,at = seq(1, 5),label = NA,tck = tick0)
  mtext(seq(.7, 1, .1),side = 1,at = seq(.7, 1, .1),cex = 7/8)
  mtext(2^seq(1, 5),side = 4,at = seq(1, 5),cex = 7/8,las = 1,line = .1)
  mtext('Power',side = 1,line = 1)


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-25 20:17 , Processed in 0.021542 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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