wavEDOF(wmtsa)
wavEDOF()所属R语言包:wmtsa
Equivalent degrees of freedom (EDOF) estimates for a chi-squared distribution
卡方分布的估计等效自由度(EDOF)
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Let X be a collection of M uncorrelated zero mean Gaussian random variables (RVs). The sum of the squares of the RVs in X will obey a scaled chi-square distribution with M degrees of freedom (DOF). If, however, the original Gaussian RVs are (partially) correlated, we can approximate the distribution of the sum of the squares of (correlated Gaussian) RVs using a scaled chi-square distribution with the DOF adjusted for the correlation in the RVs. These adjusted DOF estimates are known as the equivalent degrees of freedom (EDOF). In the context of unbiased wavelet variance analysis, the EDOF can be used to estimate confidence intervals that are guaranteed to have non-negative bounds.
设X是一个集合的M不相关的零均值高斯随机变量(RVS)。房车在X的平方的总和将服从卡方分布与M自由度(DOF)的比例。然而,如果原来的高斯随机变量是(部分)相关性,我们可以近似的分布(相关的高斯)的RV使用一个按比例调整对RV中的相关性的DOF的卡方分布的平方的总和。这些是已知的调整自由度估计作为等效自由度(EDOF)。在中立的小波方差分析的情况下,能够使用的EDOF都保证有非负的范围内的估计的置信区间。
This program calculates three estimates of the EDOF for each level of a discrete wavelet transform. The three modes are described as follows for the MODWT of an an input sequence X(t):
这个程序用来计算估计的EDOF每个级别的离散小波变换。在三种模式中描述如下为MODWT中的某一个输入序列中X(t):
EDOF 1 Large sample approximation that requires an SDF estimation via wavelet coefficients.
EDOF大样本,通过小波系数需要SDF估计,近似。
<p align="center">s(j,tau) = (1 / Mj) * sum[t=0,..., Mj - 1]{d(j,t)}
<p ALIGN="CENTER"> s(j,tau) = (1 / Mj) * sum[t=0,..., Mj - 1]{d(j,t)}
<p align="center">Aj = s(j,0)/2 + sum[tau=1,...,Mj-1]s(j,tau)^2.
<p ALIGN="CENTER"> Aj = s(j,0)/2 + sum[tau=1,...,Mj-1]s(j,tau)^2.
EDOF 2 Large sample approximation where the SDF is known a priori.
EDOF 2大样本近似,其中被称为自卫队的先验。
EDOF 3 Large sample approximation using a band-pass approximation for the SDF.
EDOF 3大样本近似,近似为日本自卫队使用的带通。
用法----------Usage----------
参数----------Arguments----------
参数:x
an object of class wavTransform or a vector containing a uniformly-sampled real-valued time series.
类的一个对象wavTransform或向量的均匀采样的实值时间序列。
参数:levels
a vector containing the decomposition levels. Default: when x is of class wavTransform then levels is set to 1:n.level, otherwise levels is set to 1:J, where J is the maximum wavelet transform level in which there exists at least one interior wavelet coefficient.
一个向量的分解水平。默认值:当x类wavTransform然后levels设置为1:n.level,否则levels设置为1:J,<X >是小波变换的最大水平,其中存在至少一个内部的小波系数。
参数:n.fft
a positive integer (greater than one) defining the number of frequencies to use in evaluating the SDF for EDOF 2 calculations. The frequencies are uniformly distributed over the interval [0, Nyquist] ala f=[0, 1/P , 2/P, 3/P, ..., (n.freq-1)/P] where P=2*(n.freq-1)/sampling.interval. Only used when the input SDF is not NULL. Default: 1024.
一个正整数(大于1)限定的数目的频率使用在评估自卫队EDOF 2计算。均匀地分布在该频率的时间间隔[0,奈奎斯特]丙氨酸F = [0,1 / P,2/3 / P,P,...,(n.freq-1)/ P],其中P = 2 * (n.freq-1)/ sampling.interval。仅用于输入SDF是不是NULL的。默认值:1024。
参数:sampling.interval
sampling interval of the time series. Default: 1.
采样间隔的时间序列。默认值:1。
参数:sdf
a spectral density function of the process corresponding to the input time series. This input must be a function whose first argument is f (representing frequency). At a minimum, the SDF must be defined over frequencies [0, Nyquist] where Nyquist=1/(2*sampling.interval). Additional arguments that are needed to calculate the SDF should be passed via the sdfargs parameter. This argument is used only for calculating mode 2 EDOF. If the EDOF mode 2 estimates are not desired, specify this this argument as NULL and the EDOF mode 2 and corresponding confidence intervals will not be calculated. See the mutilsSDF function for more details. Default: NULL.
谱密度函数的过程中,对应于输入的时间序列。该输入必须是一个函数的第一个参数是f(即频率)。至少,日本自卫队必须定义在奈奎斯特频率[0,]Nyquist=1/(2*sampling.interval)。应通过sdfargs参数传递额外的参数所需要的计算自卫队。该参数仅用于计算模式2 EDOF。如果EDOF模式2估计不理想,指定这个参数NULL和EDOF模式的2和相应的置信区间将不会被计算。请参阅mutilsSDF功能的更多详细信息,。默认值:NULL。
参数:sdfargs
a list of arguments passed directly to the SDF function ala do.call. Default: NULL (no additional arguments).
参数列表直接传递到SDF功能阿拉的do.call。默认值:NULL(没有额外的参数)。
参数:wavelet
a character string denoting the filter type. See wavDaubechies for details. Only used if input x is a time series. Default: "s8".
一个字符串,表示过滤器的类型。见wavDaubechies的详细信息。仅用于如果输入x是一个时间序列。默认值:"s8"。
值----------Value----------
a list containing the EDOF estimates for modes 1, 2 and 3 as well as the block-dependent unbiased wavelet variance estimates.
的列表中包含的EDOF估计为模式1,2和3,以及依赖于块的中立小波方差估计。
参考文献----------References----------
D. B. Percival and A. T. Walden, Wavelet Methods for Time Series Analysis, Cambridge University Press, 2000.
参见----------See Also----------
实例----------Examples----------
## initialize variables [#初始化变量]
n.level <- 9
wavelet <- "d6"
N <- 4096
phi <- 0.9
## define input SDF [#定义输入SDF]
S <- function(f, phi) 1/(1 + phi^2 - 2*phi*cos(2*pi*f))
sdfarg <- list(phi=phi)
## create series and MODWT [#创建系列和MODWT的]
set.seed(100)
x <- rnorm(N)
W <- wavMODWT(x, wavelet=wavelet, n.level=n.level)
## calculate EDOF using the wavTransform object [#计算EDOF使用wavTransform对象]
z1 <- wavEDOF(W, sdf=S, sdfarg=sdfarg)
print(z1)
## calculate EDOF using original time series [#使用原始时间序列计算EDOF]
z2 <- wavEDOF(x, wavelet=wavelet, levels=seq(n.level), sdf=S, sdfarg=sdfarg)
print(z2)
## compare the two approaches [#比较这两种方法。]
print(all.equal(z1,z2))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|